/*
* pettanR peta.apps.js
- * version 0.5.12
+ * version 0.5.13
*
* author:
* itozyun
ui, inputX, inputY, inputZ, inputA, inputW, inputH, inputAspectRatio,
inputPercentW, inputPercentH,
currentPanelElement = null,
- currentElementType = -1,
- currentLock = false;
+ currentElementType = -1;
return WINDOWS_CONTROL.createWindow(
{
});
},
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,
} else {
}
- },
- lock: function( _currentLock ){
- currentLock = !!_currentLock;
- INFOMATION_WINDOW.bodyBackOrForward( !currentLock );
}
},
'infomation-window', 'Infomation', 0, 30, 200, 180, true
baseX, baseY, baseW, baseH,
currentX, currentY, currentW, currentH,
offsetX, offsetY,
- lock = false,
error = 0;
function draw( _x, _y, _w, _h ){
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(
{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;
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
}
var PANEL_ELEMENT_CONTROL = ( function(){
var elmContainer,
currentElement = null,
- currentLockTest = false,
- currentLock = false,
panelX, panelY, panelW, panelH,
startX, startY;
/*
_elm = currentElement;
if( _elm !== null ){
- currentLockTest = currentLockTest === true && _x === 0 && _y === 0;
if( _elm.busy() === true ){
_elm.mousemove( _x, _y );
return true;
_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 ];
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 ){
startY = panelY;
if( currentElement === null) return false
currentElement.mousedown( _mouseX -startX, _mouseY -startY);
- currentLockTest = true;
return true;
},
busy: 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){
}