pew pew, no idea
parent
8e14a7aea6
commit
44678b18af
8
CBDL.js
8
CBDL.js
|
@ -32,7 +32,6 @@ CBDL.App.prototype.Go = function() {
|
|||
this._includes.add(this.requires[require]);
|
||||
}
|
||||
}
|
||||
console.log(this.name);
|
||||
if (this._includes) {
|
||||
if (this._includes.state != CBDL.states.LOADED) {
|
||||
this.includeCallback = function(return_value) {
|
||||
|
@ -536,7 +535,7 @@ CBDL.Event.prototype.pollEvent = function() {
|
|||
}
|
||||
};
|
||||
|
||||
// TODO: move this too CBDL.Graphics - it doesn't belong here.
|
||||
// TODO: move this to CBDL.Graphics - it doesn't belong here.
|
||||
CBDL.Event.prototype.getMouse = function(event, display) {
|
||||
return ( {x: (event.clientX-display.element.offsetLeft), y: (event.clientY-display.element.offsetTop)} );
|
||||
};
|
||||
|
@ -579,6 +578,7 @@ the first 'pre' tag is provided to the callback.
|
|||
*/
|
||||
CBDL.loadFile = function(file, callback) {
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.content = "application/json;charset=UTF-8";
|
||||
iframe.id = file;
|
||||
iframe.style.display = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
|
@ -633,6 +633,9 @@ CBDL.requestFile = function(file, callback) {
|
|||
request.send(null);
|
||||
};
|
||||
|
||||
CBDL.Window = function(){};
|
||||
CBDL.Window.setTitle = function(string) { document.title = string; }
|
||||
|
||||
CBDL.Console = function(name) {
|
||||
this.name = name;
|
||||
this.logs = [];
|
||||
|
@ -653,7 +656,6 @@ CBDL.Console.prototype.startPrinting = function() {
|
|||
this.is_printing = true;
|
||||
};
|
||||
|
||||
|
||||
CBDL.Console.prototype.log = function(string) {
|
||||
var time = new Date().toJSON();
|
||||
if (this.is_logging) {
|
||||
|
|
|
@ -414,6 +414,7 @@ CBDL.Graphics.DivDisplay.prototype._Image_ = function(display, image, scale, rot
|
|||
this.data.src = image;
|
||||
this.scale = scale;
|
||||
this.rotation = rotation;
|
||||
this.data.style.visibility = 'hidden';
|
||||
};CBDL.extend(CBDL.Graphics.BaseDisplay.prototype._Drawable_, CBDL.Graphics.DivDisplay.prototype._Image_);
|
||||
CBDL.Graphics.DivDisplay.prototype._Image_.prototype.destroy = function() {
|
||||
this.data.parentNode.removeChild(this.data);
|
||||
|
|
Loading…
Reference in New Issue