var TextHandler = function(canvas) {this.canvas = canvas; this.buffer = null};
$.extend(TextHandler.prototype, {
handle: function(node, text) {
- console.log('canvas text handler: ' + text);
+ //console.log('canvas text handler: ' + text);
this.setText(text, node);
return;
if(!this.node) {
canvasNode.detach();
},
nodeTextChange: function(event) {
- console.log('wlxmlListener: ' + event.meta.node.getText());
+ //console.log('wlxmlListener: ' + event.meta.node.getText());
var canvasElement = utils.findCanvasElement(event.meta.node),
toSet = event.meta.node.getText();
if(toSet === '') {
},
setText: function(text) {
- console.log('smartxml: ' + text);
+ //console.log('smartxml: ' + text);
this.nativeNode.data = text;
this.triggerTextChangeEvent();
},
},
transform: function(transformation, args) {
- console.log('transform');
+ //console.log('transform');
var Transformation, toret;
if(typeof transformation === 'string') {
Transformation = this.transformations.get(transformation);
this.undoStack.push(transformation);
}
this._transformationLevel--;
- console.log('clearing redo stack');
+ //console.log('clearing redo stack');
this.redoStack = [];
return toret;
} else {
Object.defineProperty(transformation.args, key, {
get: function() {
if(transformation.hasRun) {
- console.log('returning via path');
+ //console.log('returning via path');
return transformation.document.getNodeByPath(path);
} else {
- console.log('returning original arg');
+ //console.log('returning original arg');
return value;
}