Created
November 15, 2010 11:31
-
-
Save kuon/700274 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editor = new SGU.ScreenEditor('SGScreenEditor', | |
{screenWidth: SG.screenLayoutController.get('width'), | |
screenHeight:SG.screenLayoutController.get('height')}); | |
SG.currentScreenEditor = editor; | |
var surfaces = SG.screenLayoutController.get('surfaces'); | |
editor._surfaces = surfaces; | |
surfaces.forEach(function (s) { | |
s._zone = new SGU.ScreenEditor.Zone(editor); | |
s.addObserver('status', {cb:function(obj) { | |
console.log('status'); | |
console.log(obj.toString()); | |
if(!obj.isLoaded()) | |
return; | |
s._zone.create(obj.get('x'), | |
obj.get('y'), | |
obj.get('width'), | |
obj.get('height')); | |
}}, 'cb'); | |
s.refresh(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment