OSDN Git Service

client is version 0.5.13, panel element lock removeed.
authoritozyun <itozyun@gmail.com>
Thu, 6 Sep 2012 23:31:51 +0000 (08:31 +0900)
committeritozyun <itozyun@gmail.com>
Thu, 6 Sep 2012 23:31:51 +0000 (08:31 +0900)
app/assets/javascripts/peta.apps.js

index d8833a4..9e54304 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR peta.apps.js
- *   version 0.5.12
+ *   version 0.5.13
  *   
  * author:
  *   itozyun
@@ -2030,8 +2030,7 @@ var Editor = gOS.registerApplication( function(){
                        ui, inputX, inputY, inputZ, inputA, inputW, inputH, inputAspectRatio,
                        inputPercentW, inputPercentH,
                        currentPanelElement = null,
-                       currentElementType = -1,
-                       currentLock = false;
+                       currentElementType = -1;
 
                return WINDOWS_CONTROL.createWindow(
                        {
@@ -2059,8 +2058,6 @@ var Editor = gOS.registerApplication( function(){
                                        });
                                },
                                update: function( currentElement ){
-                                       if( currentLock === true && currentElement === null ) return;
-
                                        var _elementType = currentElement === null ? -1 : currentElement.type,
                                                x = currentElement !== null ? currentElement.x : 0,
                                                y = currentElement !== null ? currentElement.y : 0,
@@ -2111,10 +2108,6 @@ var Editor = gOS.registerApplication( function(){
                                        } else {
                                                
                                        }
-                               },
-                               lock: function( _currentLock ){
-                                       currentLock = !!_currentLock;
-                                       INFOMATION_WINDOW.bodyBackOrForward( !currentLock );
                                }
                        },
                        'infomation-window', 'Infomation', 0, 30, 200, 180, true
@@ -2821,7 +2814,6 @@ var Editor = gOS.registerApplication( function(){
                        baseX, baseY, baseW, baseH,
                        currentX, currentY, currentW, currentH,
                        offsetX, offsetY,
-                       lock  = false,
                        error = 0;
                
                function draw( _x, _y, _w, _h ){
@@ -2836,10 +2828,10 @@ var Editor = gOS.registerApplication( function(){
                                elmResizerContainerStyle.height = _h + 'px';
                                elmResizerTopStyle.left = elmResizerBottomStyle.left = FLOOR( _w / 2 - 5 ) + 'px';
                                elmResizerLeftStyle.top = elmResizerRightStyle.top   = FLOOR( _h / 2 - 5 ) + 'px';
-                       } catch(e){
+                       } catch( e ){
                                alert( [x, y, w, h].join( ','));
                                return;
-                       }
+                       };
                        
                        POSITION_ARRAY.splice( 0, POSITION_ARRAY.length );
                        POSITION_ARRAY.push(
@@ -2852,7 +2844,7 @@ var Editor = gOS.registerApplication( function(){
                                {x:     _x -HIT_AREA,                   y:      _y +_h -5,                      w:      HIT_AREA +5,    h:      HIT_AREA +5},
                                {x:     _x +_w -5,                              y:      _y +_h -5,                      w:      HIT_AREA +5,    h:      HIT_AREA +5}
                        );
-               }
+               };
                
                function update( _x, _y, _w, _h ){
                        var __w, __h;
@@ -3070,13 +3062,6 @@ var Editor = gOS.registerApplication( function(){
                                        currentElement.animate( startX, startY, startW, startH, startFilpV, startFilpH) :
                                        currentElement.animate( startX, startY, startW, startH, angle);
                        },
-                       lock: function( _lock ){
-                               if( _lock !== undefined){
-                                       elmResizerContainerStyle.borderColor = _lock === true ? 'blue' : '';
-                                       lock = _lock;
-                               }
-                               return lock;
-                       },
                        onShiftUpdate: update,
                        onCtrlUpdate: update
                }
@@ -3543,8 +3528,6 @@ var Editor = gOS.registerApplication( function(){
        var PANEL_ELEMENT_CONTROL = ( function(){
                var     elmContainer,
                        currentElement  = null,
-                       currentLockTest = false,
-                       currentLock     = false,
                        panelX, panelY, panelW, panelH,
                        startX, startY;
        /*
@@ -3700,7 +3683,6 @@ var Editor = gOS.registerApplication( function(){
                                        _elm = currentElement;
                                        
                                if( _elm !== null ){
-                                       currentLockTest = currentLockTest === true && _x === 0 && _y === 0;
                                        if( _elm.busy() === true ){
                                                _elm.mousemove( _x, _y );
                                                return true;
@@ -3709,10 +3691,6 @@ var Editor = gOS.registerApplication( function(){
                                                _elm.mousemove( _x, _y ); // cursor
                                                return true;
                                        }
-                                       if( currentLock === true ){
-                                               currentLockTest = true;
-                                               return true;
-                                       }
                                };
                                for( var i=0; i<l; ++i ){
                                        _elm = PANEL_ELEMENT_ARRAY[ i ];
@@ -3730,9 +3708,6 @@ var Editor = gOS.registerApplication( function(){
                        mouseup: function( _mouseX, _mouseY ){
                                var ret = currentElement !== null && currentElement.busy() === true;
                                ret === true && currentElement.mouseup( _mouseX -startX || panelX, _mouseY -startY || panelY );
-                               currentLock = currentLockTest === true && currentElement.hitTest( _mouseX -panelX, _mouseY -panelY ) === true;
-                               RESIZE_OPERATOR.lock( currentLock );
-                               INFOMATION_WINDOW.lock( currentLock );
                                return ret;
                        },
                        mousedown: function( _mouseX, _mouseY ){
@@ -3740,7 +3715,6 @@ var Editor = gOS.registerApplication( function(){
                                startY = panelY;
                                if( currentElement === null) return false
                                currentElement.mousedown( _mouseX -startX, _mouseY -startY);
-                               currentLockTest = true;
                                return true;
                        },
                        busy: function(){
@@ -4220,7 +4194,7 @@ var ComicConsole = gOS.registerApplication( function(){
                                        elmIframe.onload = null;
                                        try {
                                                console.log( ( elmIframe.contentWindow || elmIframe.contentDocument.parentWindow ).document.body.innerHTML );
-                                               console.log( ( elmIframe.contentWindow || elmIframe.contentDocument.parentWindow[ 'current_author' ] ) )
+                                               console.log( ( elmIframe.contentWindow || elmIframe.contentDocument.parentWindow )[ 'current_author' ] );
                                        } catch(e){
                                                
                                        }