|
|
@ -42,14 +42,26 @@ export default { |
|
|
var offsetViewer = canvas[method](opts.view); |
|
|
var offsetViewer = canvas[method](opts.view); |
|
|
offsetViewer.style.opacity = ''; |
|
|
offsetViewer.style.opacity = ''; |
|
|
|
|
|
|
|
|
var marginT = this['marginT' + state]; |
|
|
let marginT = this['marginT' + state]; |
|
|
var marginB = this['marginB' + state]; |
|
|
let marginB = this['marginB' + state]; |
|
|
var marginL = this['marginL' + state]; |
|
|
let marginL = this['marginL' + state]; |
|
|
var marginR = this['marginR' + state]; |
|
|
let marginR = this['marginR' + state]; |
|
|
var padT = this['padT' + state]; |
|
|
let padT = this['padT' + state]; |
|
|
var padB = this['padB' + state]; |
|
|
let padB = this['padB' + state]; |
|
|
var padL = this['padL' + state]; |
|
|
let padL = this['padL' + state]; |
|
|
var padR = this['padR' + state]; |
|
|
let padR = this['padR' + state]; |
|
|
|
|
|
|
|
|
|
|
|
if (offsetViewer.childNodes.length) { |
|
|
|
|
|
this[stateVar] = '1'; |
|
|
|
|
|
marginT = offsetViewer.querySelector('[data-offset-m-t]'); |
|
|
|
|
|
marginB = offsetViewer.querySelector('[data-offset-m-b]'); |
|
|
|
|
|
marginL = offsetViewer.querySelector('[data-offset-m-l]'); |
|
|
|
|
|
marginR = offsetViewer.querySelector('[data-offset-m-r]'); |
|
|
|
|
|
padT = offsetViewer.querySelector('[data-offset-p-t]'); |
|
|
|
|
|
padB = offsetViewer.querySelector('[data-offset-p-b]'); |
|
|
|
|
|
padL = offsetViewer.querySelector('[data-offset-p-l]'); |
|
|
|
|
|
padR = offsetViewer.querySelector('[data-offset-p-r]'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (!this[stateVar]) { |
|
|
if (!this[stateVar]) { |
|
|
var stateLow = state.toLowerCase(); |
|
|
var stateLow = state.toLowerCase(); |
|
|
|