Browse Source

fixed 3 ui bugs

Michael 10 years ago
parent
commit
082a958aa5

+ 7 - 0
src/allplatforms/classes/Selection.js

@@ -64,6 +64,13 @@ SC.loadPackage({ 'Selection': {
             comment:    'I update the menu of widgets according to the current selection.',
             code:       function(){
 
+
+                // Update widget menu to the right
+                for(var widgetsRight = this.get('widgetsRight'), i = 0, l = widgetsRight.length;
+                    i < l; i++){
+                    widgetsRight[i].set({ isWidgetActive: false });
+                }
+
                 // Update widget menu to the bottom
 
                 var elements                = this.get('elements'),

+ 0 - 2
src/allplatforms/classes/WidgetDelete.js

@@ -23,8 +23,6 @@ SC.loadPackage({ 'WidgetDelete': {
 
                 this.get('widgetButton').addEventListener('mouseup', function(evt){
 
-                    self.set({ isWidgetActive: false });
-
                     self.do('action');
 
                 }, false);

+ 4 - 4
src/allplatforms/classes/WidthMarkers.js

@@ -100,7 +100,7 @@ SC.loadPackage({ 'WidthMarkers': {
                     wasVisible = true,
                     moving = false,
 
-                    gridVisible,
+                    showOutlines,
 
                     onMouseDown = function(evt){
                         if(evt.button !== 0) return;
@@ -112,8 +112,8 @@ SC.loadPackage({ 'WidthMarkers': {
                         self.set({ visible: true });
                         moving = true;
 
-                        gridVisible = SuperGlue.get('document').get('grid').get('visible');
-                        SuperGlue.get('document').get('grid').set({ visible: true });
+                        showOutlines = SuperGlue.get('document').get('showOutlines');
+                        SuperGlue.get('document').set({ showOutlines: true });
 
                         
                         (function(width){
@@ -149,7 +149,7 @@ SC.loadPackage({ 'WidthMarkers': {
                         self.get('markerLeft').classList.add('sg-editing-width-marker-left-visible');
                         self.get('markerRight').classList.add('sg-editing-width-marker-right-visible');
 
-                        SuperGlue.get('document').get('grid').set({ visible: gridVisible });
+                        SuperGlue.get('document').set({ showOutlines: showOutlines });
 
                         (function(width){