From ec37028c6fe7a6799f9a3b3ee5eb36754c1dc924 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 10 May 2012 16:12:56 -0700 Subject: Fixing the select and text area PI Signed-off-by: Valerio Virgillito --- js/panels/components-panel.reel/components-panel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/panels') diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index 9b237229..171bef57 100755 --- a/js/panels/components-panel.reel/components-panel.js +++ b/js/panels/components-panel.reel/components-panel.js @@ -346,7 +346,7 @@ exports.ComponentsPanel = Montage.create(Component, { break; case "select": el = document.application.njUtils.make("select", null, this.application.ninja.currentDocument); - document.application.njUtils.createModelForComponent(el, "Select"); + document.application.njUtils.createModelForComponent(el, "SelectInput"); break; case "radioButton": el = document.application.njUtils.make("input", null, this.application.ninja.currentDocument); @@ -366,7 +366,7 @@ exports.ComponentsPanel = Montage.create(Component, { break; case "textarea": el = document.application.njUtils.make("textarea", null, this.application.ninja.currentDocument); - document.application.njUtils.createModelForComponent(el, "TextArea"); + document.application.njUtils.createModelForComponent(el, "Textarea"); break; case "toggleButton": el = document.application.njUtils.make("button", null, this.application.ninja.currentDocument); -- cgit v1.2.3 From 90d158a3372b6c8ac2deb8b82070d76135e72397 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 10 May 2012 16:49:18 -0700 Subject: Fixing the components double click center stage position. Signed-off-by: Valerio Virgillito --- js/panels/components-panel.reel/components-panel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/panels') diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index 171bef57..87d5082d 100755 --- a/js/panels/components-panel.reel/components-panel.js +++ b/js/panels/components-panel.reel/components-panel.js @@ -404,8 +404,8 @@ exports.ComponentsPanel = Montage.create(Component, { //if(!this.centerStage) { var top, left; - top = ~~((parseFloat(this.application.ninja.elementMediator.getProperty(this.application.ninja.currentDocument.documentRoot, "height"))) / 2); - left = ~~((parseFloat(this.application.ninja.elementMediator.getProperty(this.application.ninja.currentDocument.documentRoot, "width"))) / 2); + top = (this.application.ninja.stage.canvas.height / 2); // ~~((parseFloat(this.application.ninja.elementMediator.getProperty(this.application.ninja.currentDocument.documentRoot, "height"))) / 2); + left = (this.application.ninja.stage.canvas.width / 2); //~~((parseFloat(this.application.ninja.elementMediator.getProperty(this.application.ninja.currentDocument.documentRoot, "width"))) / 2); //this.centerStage = [top, left]; return [left, top]; //} -- cgit v1.2.3