use Ox.print instead of console.log
This commit is contained in:
parent
4cc7bad63c
commit
9eac279745
7 changed files with 16 additions and 16 deletions
|
@ -65,7 +65,7 @@
|
||||||
latLng = Ox.getLatLng((e.clientX - left) / width, (e.clientY - top) / height);
|
latLng = Ox.getLatLng((e.clientX - left) / width, (e.clientY - top) / height);
|
||||||
Ox.getPlacemarks(latLng.lat, latLng.lng, function(data) {
|
Ox.getPlacemarks(latLng.lat, latLng.lng, function(data) {
|
||||||
var length = data.results.length;
|
var length = data.results.length;
|
||||||
console.log(data)
|
Ox.print(data)
|
||||||
if (length && data.results[length - 1].types[0] == "country") {
|
if (length && data.results[length - 1].types[0] == "country") {
|
||||||
var $img = $("#" + data.results[length - 1].address_components[0].short_name);
|
var $img = $("#" + data.results[length - 1].address_components[0].short_name);
|
||||||
if (!$img.length) {
|
if (!$img.length) {
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
if (data.results.length) {
|
if (data.results.length) {
|
||||||
var location = data.results[0].geometry.location,
|
var location = data.results[0].geometry.location,
|
||||||
xy = Ox.getXY(location.lat(), location.lng());
|
xy = Ox.getXY(location.lat(), location.lng());
|
||||||
//console.log(+new Date, place.name, location, xy);
|
//Ox.print(+new Date, place.name, location, xy);
|
||||||
var $img = $("<img/>")
|
var $img = $("<img/>")
|
||||||
.attr({
|
.attr({
|
||||||
id: data.results[0].address_components[0].short_name,
|
id: data.results[0].address_components[0].short_name,
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
$img.removeClass("hover");
|
$img.removeClass("hover");
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
//console.log("no results", place, data)
|
//Ox.print("no results", place, data)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -169,10 +169,10 @@
|
||||||
lng: data.results[0].geometry.viewport.getNorthEast().lng().toFixed(10)
|
lng: data.results[0].geometry.viewport.getNorthEast().lng().toFixed(10)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
console.log(JSON.stringify(d))
|
Ox.print(JSON.stringify(d))
|
||||||
json.push(d);
|
json.push(d);
|
||||||
} else {
|
} else {
|
||||||
console.log("no results", place, data)
|
Ox.print("no results", place, data)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (places.length) {
|
if (places.length) {
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
var png = new Ox.PNG("http://khm0.google.com/kh/v=46&x=0&y=0&z=0");
|
var png = new Ox.PNG("http://khm0.google.com/kh/v=46&x=0&y=0&z=0");
|
||||||
png.load(function() {
|
png.load(function() {
|
||||||
console.log(png.getChunks());
|
Ox.print(png.getChunks());
|
||||||
console.log(png.getSize());
|
Ox.print(png.getSize());
|
||||||
png.appendTo("body")
|
png.appendTo("body")
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -64,7 +64,7 @@ Ox = Ox || {};
|
||||||
var canvas = self.getCanvas();
|
var canvas = self.getCanvas();
|
||||||
that.context = canvas.context;
|
that.context = canvas.context;
|
||||||
that.canvas = canvas.canvas;
|
that.canvas = canvas.canvas;
|
||||||
console.log(self.getChunks())
|
Ox.print(self.getChunks())
|
||||||
callback();
|
callback();
|
||||||
};
|
};
|
||||||
that.addChunk = function(options) {
|
that.addChunk = function(options) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ $(function() {
|
||||||
{
|
{
|
||||||
value: "Change Title",
|
value: "Change Title",
|
||||||
click: function() {
|
click: function() {
|
||||||
console.log("click to change title")
|
Ox.print("click to change title")
|
||||||
$dialog.options({
|
$dialog.options({
|
||||||
title: "New Title"
|
title: "New Title"
|
||||||
});
|
});
|
||||||
|
|
|
@ -200,7 +200,7 @@
|
||||||
.bindEvent("change." + range.id, update)
|
.bindEvent("change." + range.id, update)
|
||||||
.appendTo($toolbars[4]);
|
.appendTo($toolbars[4]);
|
||||||
function update() {
|
function update() {
|
||||||
//console.log("update", range.options("value"))
|
//Ox.print("update", range.options("value"))
|
||||||
/*
|
/*
|
||||||
// fixme: make this work
|
// fixme: make this work
|
||||||
input.options({
|
input.options({
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
*/
|
*/
|
||||||
input.val(range.options("value").toFixed(1))
|
input.val(range.options("value").toFixed(1))
|
||||||
}
|
}
|
||||||
//console.log("binding to OxRange" + range.id + "Change")
|
//Ox.print("binding to OxRange" + range.id + "Change")
|
||||||
Ox.Range({
|
Ox.Range({
|
||||||
animate: true,
|
animate: true,
|
||||||
arrows: true,
|
arrows: true,
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function clickButton(val) {
|
function clickButton(val) {
|
||||||
// console.log(val);
|
// Ox.print(val);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -204,7 +204,7 @@ Ox = {
|
||||||
})();
|
})();
|
||||||
self.onChange = function(option, value) {
|
self.onChange = function(option, value) {
|
||||||
if (option == "foo") {
|
if (option == "foo") {
|
||||||
console.log("foo set to", value);
|
Ox.print("foo set to", value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.getTime = function() {
|
that.getTime = function() {
|
||||||
|
@ -225,7 +225,7 @@ Ox = {
|
||||||
self.time = 0;
|
self.time = 0;
|
||||||
})();
|
})();
|
||||||
that.bar = function() {
|
that.bar = function() {
|
||||||
console.log("Bar.bar()");
|
Ox.print("Bar.bar()");
|
||||||
}
|
}
|
||||||
return that;
|
return that;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue