diff options
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-x | js/controllers/elements/controller-factory.js | 2 | ||||
-rwxr-xr-x | js/controllers/elements/element-controller.js | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/js/controllers/elements/controller-factory.js b/js/controllers/elements/controller-factory.js index 1bbbbce0..3ac3fe14 100755 --- a/js/controllers/elements/controller-factory.js +++ b/js/controllers/elements/controller-factory.js | |||
@@ -42,6 +42,8 @@ exports.ControllerFactory = Montage.create(Montage, { | |||
42 | return ImageController; | 42 | return ImageController; |
43 | } else if(value.indexOf("video") !== -1) { | 43 | } else if(value.indexOf("video") !== -1) { |
44 | return VideoController; | 44 | return VideoController; |
45 | } else { | ||
46 | return BlockController; | ||
45 | } | 47 | } |
46 | } catch (err) { | 48 | } catch (err) { |
47 | console.log("Could not create Controller Factory " + err); | 49 | console.log("Could not create Controller Factory " + err); |
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index 452d09f1..7f553551 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js | |||
@@ -11,9 +11,8 @@ exports.ElementController = Montage.create(Component, { | |||
11 | 11 | ||
12 | addElement: { | 12 | addElement: { |
13 | value: function(el, styles) { | 13 | value: function(el, styles) { |
14 | this.application.ninja.currentDocument.documentRoot.appendChild(el); | 14 | this.application.ninja.currentSelectedContainer.appendChild(el); |
15 | // Nested elements - TODO make sure the CSS is correct before nesting elements | 15 | |
16 | // this.application.ninja.currentSelectedContainer.appendChild(el); | ||
17 | if(styles) { | 16 | if(styles) { |
18 | this.application.ninja.stylesController.setElementStyles(el, styles); | 17 | this.application.ninja.stylesController.setElementStyles(el, styles); |
19 | } | 18 | } |