editor: Missing names of exercises on a canvas
[fnpeditor.git] / src / editor / modules / documentCanvas / canvas / canvas.js
index 3dac88f..ebede40 100644 (file)
@@ -97,6 +97,15 @@ var Canvas = function(wlxmlDocument, elements, metadata, sandbox) {
 
 $.extend(Canvas.prototype, Backbone.Events, {
 
 
 $.extend(Canvas.prototype, Backbone.Events, {
 
+    createElementType: function(elementPrototype) {
+        /* TODO: reconcile this with ElementsRegister behavior */
+        var Constructor = function() {
+            documentElement.DocumentNodeElement.apply(this, Array.prototype.slice.call(arguments, 0));
+        };
+        Constructor.prototype = elementPrototype;
+        return Constructor;
+    },
+
     getElementOffset: function(element) {
         return element.dom.offset().top - this.dom.offset().top;
     },
     getElementOffset: function(element) {
         return element.dom.offset().top - this.dom.offset().top;
     },