clean up
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 12 Jul 2013 11:23:24 +0000 (13:23 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 12 Jul 2013 11:23:24 +0000 (13:23 +0200)
modules/documentCanvas/canvas/canvas.test3.js
modules/documentCanvas/canvasManager.js

index 56665d4..147da86 100644 (file)
@@ -896,7 +896,6 @@ describe('Canvas', function() {
                 position = cursor.getPosition();
 
             expect(cursor.isSelecting()).to.equal(false, 'cursor is not selecting anything');
                 position = cursor.getPosition();
 
             expect(cursor.isSelecting()).to.equal(false, 'cursor is not selecting anything');
-            //expect(cursor.getElement().getText())
             expect(position.element.getText()).to.equal('Alice has a cat');
             expect(position.offset).to.equal(5);
         });
             expect(position.element.getText()).to.equal('Alice has a cat');
             expect(position.offset).to.equal(5);
         });
index 7875450..81eb3c2 100644 (file)
@@ -200,8 +200,6 @@ Manager.prototype.command = function(command, params) {
         parent2 = selectionEnd.element.parent() || undefined;
 
     if(command === 'unwrap-node') {
         parent2 = selectionEnd.element.parent() || undefined;
 
     if(command === 'unwrap-node') {
-        // this.canvas.nodeUnwrap({node: canvasNode.create(pos.parentNode)});
-        // this.sandbox.publish('contentChanged');
         if(this.canvas.list.areItemsOfTheSameList({element1: parent1, element2: parent2})) {
             this.canvas.list.extractItems({element1: parent1, element2: parent2});
         } else if(!cursor.isSelecting()) {
         if(this.canvas.list.areItemsOfTheSameList({element1: parent1, element2: parent2})) {
             this.canvas.list.extractItems({element1: parent1, element2: parent2});
         } else if(!cursor.isSelecting()) {