renciso218 / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

Improve componentization of Blockly so that it doesn't need to be an iframe #103

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Much of Blockly uses global/static methods, rather than using instantiation.  
This means that it is not easy to write a library that uses parts of Blockly 
without communicating with an iframe.

Original issue reported on code.google.com by s...@google.com on 15 Jan 2013 at 4:54

GoogleCodeExporter commented 8 years ago

Original comment by s...@google.com on 15 Jan 2013 at 4:56

GoogleCodeExporter commented 8 years ago
Revision: 633
Author:   scr@google.com
Date:     Sun Feb 10 15:26:25 2013
Log:      Added Blockly.TopComponent to sit above both the html & svg trees.

Had a hangout with Neil last night - ultimately Blockly might be an object that 
can have multiple instances that can be injected wherever the caller wants.

For the moment as a transition, I'm providing TopComponent to manage both the 
html pieces and the svg pieces (through its SvgComponent child).

Once all the ui objects are Components in the tree somewhere under 
Blockly.TopComponent, we can focus on migrating "Blockly" from a namespace to a 
constructor/object that can be instantiated.

TBR=neil.fraser@gmail.com
BUG=103

Review URL: https://codereview.appspot.com/7307089
http://code.google.com/p/blockly/source/detail?r=633

Added:
 /trunk/core/top_component.js
Modified:
 /trunk/blockly_compressed.js
 /trunk/blockly_core.js
 /trunk/blockly_core_deps.js
 /trunk/core/component.js
 /trunk/core/inject.js
 /trunk/core/svg_component.js

Original comment by s...@google.com on 10 Feb 2013 at 11:42

GoogleCodeExporter commented 8 years ago
This refactoring has been moved to the experimental branch.  It is no longer 
blocking trunk.

Original comment by neil.fra...@gmail.com on 11 Mar 2013 at 11:06