Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
Merge branch 'SketchSpace' of github.com:redhog/pad into SketchSpace
Browse files Browse the repository at this point in the history
  • Loading branch information
Egil Moeller committed Apr 12, 2011
2 parents b519ab1 + 7876464 commit 3c457c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dojo.declare("sketchSpaceDesigner.designer.editor.Editor", [], {
resize: function () {
this.surface_size = {width: $(this.container).width(), height: $(this.container).height()};
this.surface.setDimensions(this.surface_size.width, this.surface_size.height);
return $(this.container).width() > 1 && $(this.container).height() > 1;
},

setOptions: function (options, onlyDefault) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ dojo.declare("sketchSpaceDesigner.designer.DesignerUI", [dijit._Widget, dijit._T
}

this.editor = new sketchSpaceDesigner.designer.editor.Editor(this.editorArea, this.attr("userId"), this, typeof(pad) == "undefined");

var editor = this.editor;
window.setTimeout(function () { editor.resize(); }, 1000);
function resizeUntilDone () {
if (!editor.resize())
window.setTimeout(resizeUntilDone, 1000);
}
resizeUntilDone();

dojo.connect(this.editor, "selectImage", this, this.onSelectImage);
dojo.connect(this.editor, "deselectImage", this, this.onDeselectImage);
Expand Down

0 comments on commit 3c457c8

Please sign in to comment.