fnp
/
fnpeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b16226e
)
editor: canvas - allow for resetting the container background
author
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 6 Aug 2014 13:47:54 +0000
(15:47 +0200)
committer
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 14 Aug 2014 14:26:14 +0000
(16:26 +0200)
src/editor/modules/documentCanvas/canvas/container.js
patch
|
blob
|
history
src/editor/modules/documentCanvas/canvas/container.less
[new file with mode: 0644]
patch
|
blob
src/editor/modules/documentCanvas/documentCanvas.less
patch
|
blob
|
history
diff --git
a/src/editor/modules/documentCanvas/canvas/container.js
b/src/editor/modules/documentCanvas/canvas/container.js
index
069c78a
..
663a159
100644
(file)
--- a/
src/editor/modules/documentCanvas/canvas/container.js
+++ b/
src/editor/modules/documentCanvas/canvas/container.js
@@
-8,9
+8,11
@@
var $ = require('libs/jquery'),
var Container = function(nodes, params, element) {
var Container = function(nodes, params, element) {
+ params = params || {};
_.extend(this, params);
this.dom = this.dom || $('<div>');
this.dom.addClass('canvas-container');
_.extend(this, params);
this.dom = this.dom || $('<div>');
this.dom.addClass('canvas-container');
+ this.dom.toggleClass('reset-background', !!params.resetBackground);
this.element = element;
nodes.forEach(function(node) {
this.element = element;
nodes.forEach(function(node) {
diff --git a/src/editor/modules/documentCanvas/canvas/container.less
b/src/editor/modules/documentCanvas/canvas/container.less
new file mode 100644
(file)
index 0000000..
dc4a514
--- /dev/null
+++ b/
src/editor/modules/documentCanvas/canvas/container.less
@@ -0,0
+1,5
@@
+.canvas-container {
+ .reset-background {
+ background-color: @white;
+ }
+}
diff --git
a/src/editor/modules/documentCanvas/documentCanvas.less
b/src/editor/modules/documentCanvas/documentCanvas.less
index
3d335dc
..
9677691
100644
(file)
--- a/
src/editor/modules/documentCanvas/documentCanvas.less
+++ b/
src/editor/modules/documentCanvas/documentCanvas.less
@@
-1,5
+1,6
@@
@import 'nodes.less';
@import 'canvas/canvas.less';
@import 'nodes.less';
@import 'canvas/canvas.less';
+@import 'canvas/container.less';
@import 'canvas/documentElement.less';
@import 'canvas/genericElement.less';
@import 'canvas/gutter.less';
@import 'canvas/documentElement.less';
@import 'canvas/genericElement.less';
@import 'canvas/gutter.less';