remove specific layouts so that the editor fills the container. sc-editor
authorKevin Dangoor <kdangoor@mozilla.com>
Mon, 26 Oct 2009 15:25:02 -0400
branchsc-editor
changeset 144 a399e934f7bcd92be6c891f992469f357024fbf8
parent 143 2beeff68a46efa96f3785b5f8536372b3a51f462
child 145 7c407fe827bc51861a3c5d4ca8b50a5653064ce8
child 146 6630b090773fdb95e829dcff4130e82f2d1135d7
push id54
push userkdangoor@mozilla.com
push dateMon, 26 Oct 2009 19:25:06 +0000
remove specific layouts so that the editor fills the container.
src/bespin-core/lib/bespin/editor/view.js
src/bespin-core/lib/bespin/embed.js
--- a/src/bespin-core/lib/bespin/editor/view.js
+++ b/src/bespin-core/lib/bespin/editor/view.js
@@ -26,17 +26,16 @@ var SC = require("sproutcore");
 
 var bespin = require("bespin");
 var syntax = require("bespin/syntax");
 var actions = require("bespin/actions");
 var keys = require("bespin/util/keys");
 var cursor = require("bespin/cursor");
 
 exports.EditorView = SC.View.extend({
-    layout: { centerY: 0, height: 300, width: 300, centerX: 0 },
     render: function(context, firstTime) {
         this.sc_super();
         if (firstTime) {
             console.log("Creating canvas");
             context = context.begin('canvas').attr('moz-opaque', 'true').attr("tabindex", "-1").end();
         }
     },
     
--- a/src/bespin-core/lib/bespin/embed.js
+++ b/src/bespin-core/lib/bespin/embed.js
@@ -44,17 +44,16 @@ exports.useBespin = function(element, op
     // Creating the editor alters the components innerHTML
     var originalInnerHtml = element.innerHTML;
     
     var controller = EditorController.create({});
     SC.run(function() {
         bespin.register("editor", controller);
 
         var editorPane = SC.Pane.create({
-            layout: {centerX: 0, centerY: 0, width: 300, height: 300}
         });
         editorPane.appendChild(controller.ui, null);
         SC.$(element).css('position', 'relative');
         element.innerHTML = "";
         editorPane.appendTo(element);
         if (options.initialContent) {
             controller.model.insertDocument(options.initialContent);
         } else {