OSDN Git Service

client is version0.4.27, added timer for appendChild, but still clash at ie7-.
[pettanr/pettanr.git] / public / assets / work.js
index 4a67e64..d3e3397 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  * pettanR work.js\r
- *   version 0.4.26\r
+ *   version 0.4.27\r
  *   \r
  * author:\r
  *   itozyun\r
@@ -1484,7 +1484,7 @@ pettanr.editor = pettanr.view.registerApplication( function(){
                function edit(){\r
                        if( currentElement === null || currentElement.type !== PANEL_ELEMENT_TYPE_TEXT) return;\r
                        pettanr.textEditor.bootInOverlay( PANEL_CONTROL.x(), PANEL_CONTROL.y(), currentElement );\r
-                       buttonBackOrForward( true);\r
+                       buttonBackOrForward( true );\r
                }\r
                function change(){\r
                        if( currentElement === null) return;\r
@@ -2341,7 +2341,7 @@ pettanr.editor = pettanr.view.registerApplication( function(){
                })();\r
                \r
                var JQ_WRAPPER = jqTextElementOrigin.clone( true ),\r
-                       TEXT_ELM = JQ_WRAPPER.find( 'td,.speach-inner').eq( 0),\r
+                       elmText = JQ_WRAPPER.find( 'td,.speach-inner' ).get( 0 ),\r
                        type     = data.balloon_template_id,\r
                        text     = ( function(){\r
                                var _speachs = data.speaches_attributes;\r
@@ -2370,7 +2370,7 @@ pettanr.editor = pettanr.view.registerApplication( function(){
                }\r
                function updateText( _text ){\r
                        text = _text || text || '';\r
-                       TEXT_ELM.html( text );\r
+                       elmText.firstChild.data = text;\r
                }\r
                function resizeBalloon(){\r
                        balloon && balloon.resize( a, w, h );\r
@@ -2390,13 +2390,13 @@ pettanr.editor = pettanr.view.registerApplication( function(){
                        delete instance.init;\r
                }\r
                this.angle = function( _a ){\r
-                       _a !== undefined && instance.resize( undefined, undefined, undefined, undefined, _a );\r
+                       _a !== undefined && instance.resize( x, y, w, h, _a );\r
                        return a;\r
                }\r
-               this.text = function( _text){\r
+               this.text = function( _text ){\r
                        if( _text && text !== _text) {\r
                                HISTORY_CONTROL.saveState( updateText, text || '', _text );\r
-                               updateText( _text);\r
+                               updateText( _text );\r
                        }\r
                        return text;\r
                }\r
@@ -2420,14 +2420,14 @@ pettanr.editor = pettanr.view.registerApplication( function(){
                        animate !== true && resizeBalloon();\r
                }\r
                this.animate = function ( _x, _y, _w, _h, _a ){\r
-                       instance.resize( _x, _y, _w, _h, _a, true);\r
+                       instance.resize( _x, _y, _w, _h, _a, true );\r
                }\r
                this.destroy = function(){\r
                        delete instance.destroy;\r
                        \r
                        JQ_WRAPPER.stop().remove();\r
                        balloon.destroy();\r
-                       JQ_WRAPPER = TEXT_ELM = data = balloon = instance = null;\r
+                       JQ_WRAPPER = elmText = data = balloon = instance = null;\r
                }\r
        }\r
        TextElementClass.prototype = new AbstractComicElement( PANEL_ELEMENT_TYPE_TEXT );\r