OSDN Git Service

version 0.5.30, fixed OutputConsole.
authoritozyun <itozyun@gmail.com>
Sat, 8 Dec 2012 21:20:14 +0000 (06:20 +0900)
committeritozyun <itozyun@gmail.com>
Sat, 8 Dec 2012 21:20:14 +0000 (06:20 +0900)
0.5.x/javascripts/peta.apps.js
0.5.x/javascripts/system.js

index cebdf95..e3c79c7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR peta.apps.js
- *   version 0.5.29
+ *   version 0.5.30
  *   
  * author:
  *   itozyun
@@ -5093,6 +5093,7 @@ var Model = ( function(){
 var OutputConsole = gOS.registerApplication( function(){
        var FORMAT_LIST = [ 'json[POST]', 'json[GET]', 'XML', 'HTML', 'XHTML', 'MT export', 'Blogger ATOM' ];
        var elmOutputArea,
+               eventRoot, node,
                comboboxFormat, inputOption,
                buttonPost, buttonClose,
                windowW, windowH,
@@ -5156,13 +5157,15 @@ var OutputConsole = gOS.registerApplication( function(){
                ].join( '' );
 
                app.fetchCSS( pettanr.CONST.URL_PETA_APPS_CSS );
+               eventRoot = app.getPointingDeviceEventTreeRoot();
 
                delete app.onInit;
        };
        this.onOpen = function( _w, _h, _comicID, _panelID, _panelTimming, _panelW, _panelH, _borderSize, _panelElementArray ){
                elmOutputArea = document.getElementById( 'output-area' );
                
-               var ui = app.createUIGroup();
+               node   = eventRoot.createNode( app.rootElement, true, true );
+               var ui = app.createUIGroup( node );
                comboboxFormat = ui.createCombobox( document.getElementById( 'output-console-format' ), formatUpdate );
                
                for( var i=0; FORMAT_LIST[ 0 ]; ++i ){
@@ -5189,13 +5192,14 @@ var OutputConsole = gOS.registerApplication( function(){
                
                formatUpdate();
        };
-       this.onPaneResize = function( _windowW, _windowH ){
-               windowW = _windowW;
-               windowH = _windowH;
-               app.rootElement.style.cssText = [
-                       'left:', Math.floor( ( _windowW - app.rootElement.offsetWidth  ) /2 ), 'px;',
-                       'top:',  Math.floor( ( _windowH - app.rootElement.offsetHeight ) /2 ), 'px;'
-               ].join( '' );
+       this.onPaneResize = function( w, h ){
+               windowW = w;
+               windowH = h;
+               //app.rootElement.style.cssText = [
+               //      'left:', Math.floor( ( _windowW - app.rootElement.offsetWidth  ) /2 ), 'px;',
+               //      'top:',  Math.floor( ( _windowH - app.rootElement.offsetHeight ) /2 ), 'px;'
+               //].join( '' );
+               node.update( w / 2 - node.width() / 2, h / 2 - node.height() / 2 );
        };
        this.onClose = function(){
                elmOutputArea.value = '';
index 4ffdd4b..51e02ab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * pettanR system.js
- *   version 0.5.29
+ *   version 0.5.30
  *
  * gadgetOS
  *   author:
@@ -1951,6 +1951,38 @@ var PointingDeviceEventTree = ( function(){
                })()
        };
        
+/*-------------------------------------
+ *  StayHelper
+ */
+       var StayEventTicketClass = function( node, data, stayhandler, opt_thisObject ){
+               node.addEventListener( 'mouseover', this.mouseoverHandler, this );
+               this.node       = node;
+               this.data       = data;
+               this.handler    = stayhandler;
+               this.thisObject = opt_thisObject;
+       };
+       StayEventTicketClass.prototype = {
+               type : 'mousestay',
+               mousestayHandler : function( e ){
+                       this.node.addEventListener( 'mouseout',  this.mousestayHandler, this );
+                       this.node.addEventListener( 'mousemove', this.mousemoveHandler, this );
+                       SystemTimer.add( this.data.apiuser, this.timeoutHandler, null, this );
+               },
+               timeoutHandler : function(){
+                       this.mouseoutHandler();
+                       return this.fire(  );
+               },
+               mouseoutHandler : function( e ){
+                       SystemTimer.remove( this.data.apiuser, this.timeoutHandler );
+                       SystemTimer.add( this.data.apiuser, this.timeoutHandler, null, this );
+               },
+               mouseoutHandler : function( e ){
+                       this.node.removeEventListener( 'mouseout', this.mousestayHandler );
+                       this.node.removeEventListener( 'mousemove', this.mousemoveHandler );
+                       SystemTimer.remove( this.data.apiuser, this.timeoutHandler );
+               }
+       };
+       
        var ScrollBarManager = ( function(){
                var elmScroller     = document.createElement( 'div' ),
                        elmBar          = document.createElement( 'div' ),
@@ -3105,8 +3137,7 @@ var ResizeEvent = ( function(){
                } else {
                        
                };
-               
-               
+
                return {
                        add: function( _apiuser, _element, _eventType, _handler, opt_thisObject ){
                                if( isApiUser( _apiuser ) === true &&