X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/f7c97ef38dc00ec9b5358ae0bf959a5e6f99271c..e816ae7584e8b11a1e24efb2f743ac744d80485b:/modules/documentCanvas/canvasNode.js?ds=inline diff --git a/modules/documentCanvas/canvasNode.js b/modules/documentCanvas/canvasNode.js index 2b108a1..bb1cee7 100644 --- a/modules/documentCanvas/canvasNode.js +++ b/modules/documentCanvas/canvasNode.js @@ -73,6 +73,10 @@ CanvasNode.prototype.parents = function() { }; +CanvasNode.prototype.isOfClass = function(klass) { + return this.getClass() && this.getClass().substr(0, klass.length) === klass; +} + return { create: function(desc) { return new CanvasNode(desc);