Browse Source

Update sw-visibility command

pull/36/head
Artur Arseniev 10 years ago
parent
commit
bc4fbff530
  1. 3
      src/canvas/view/CanvasView.js
  2. 13
      src/commands/view/SwitchVisibility.js
  3. 2
      styles/css/main.css
  4. 2
      styles/scss/main.scss

3
src/canvas/view/CanvasView.js

@ -35,8 +35,9 @@ function(Backbone, FrameView) {
var conf = this.config.em.get('Config');
body.append(wrap.render()).append(cssc.render());
var protCss = conf.protectedCss;
var frameCss = '.' + this.ppfx + 'dashed *{outline: 1px dashed rgba(170,170,170,0.7); outline-offset: -2px;}';
if(protCss)
body.append('<style>' + protCss + '</style>');
body.append('<style>' + frameCss + protCss + '</style>');
}
},

13
src/commands/view/SwitchVisibility.js

@ -1,16 +1,13 @@
define(function() {
/**
* @class SwitchVisibility
* @private
* */
return {
run: function() {
this.$canvas.addClass(this.pfx + 'dashed');
run: function(ed) {
ed.Canvas.getBody().className = this.ppfx + 'dashed';
},
stop: function() {
this.$canvas.removeClass(this.pfx + 'dashed');
stop: function(ed) {
ed.Canvas.getBody().className = "";
}
};
});

2
styles/css/main.css

@ -2784,7 +2784,7 @@ ol.example li.placeholder:before {
height: 100%;
width: 100%;
pointer-events: 'none';
padding: 1px;
padding: 1.5px;
outline: none; }
/********* PANELS **********/

2
styles/scss/main.scss

@ -264,7 +264,7 @@ ol.example li.placeholder:before {position: absolute;}
box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
height: 100%; width: 100%;
pointer-events: 'none';
padding: 1px;
padding: 1.5px;
outline: none;
}

Loading…
Cancel
Save