From: Aleksander Ɓukasz Date: Wed, 6 Aug 2014 13:47:54 +0000 (+0200) Subject: editor: canvas - allow for resetting the container background X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/cecdda17fa90040f58f36ff0abcff0f7de1784df?ds=inline;hp=b16226e229b843fe0920d8ab00da40af79a1233b editor: canvas - allow for resetting the container background --- diff --git a/src/editor/modules/documentCanvas/canvas/container.js b/src/editor/modules/documentCanvas/canvas/container.js index 069c78a..663a159 100644 --- 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) { + params = params || {}; _.extend(this, params); this.dom = this.dom || $('
'); this.dom.addClass('canvas-container'); + this.dom.toggleClass('reset-background', !!params.resetBackground); 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 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 --- 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 'canvas/container.less'; @import 'canvas/documentElement.less'; @import 'canvas/genericElement.less'; @import 'canvas/gutter.less';