Browse Source

Update the resizer in conjunction with panels

pull/856/head
Artur Arseniev 9 years ago
parent
commit
a8fbace82b
  1. 3
      src/panels/view/PanelView.js
  2. 6
      src/utils/Resizer.js

3
src/panels/view/PanelView.js

@ -77,7 +77,8 @@ module.exports = Backbone.View.extend({
width: rect.width,
height: rect.height
};
}
},
...resizable
});
resizer.blur = () => {};
resizer.focus(this.el);

6
src/utils/Resizer.js

@ -321,7 +321,7 @@ class Resizer {
const conStyle = this.container.style;
const updateTarget = this.updateTarget;
const selectedHandler = this.getSelectedHandler();
const { unitHeight, unitWidth } = config;
const { unitHeight, unitWidth, keyWidth, keyHeight } = config;
// Use custom updating strategy if requested
if (isFunction(updateTarget)) {
@ -333,8 +333,8 @@ class Resizer {
});
} else {
const elStyle = el.style;
elStyle.width = rect.w + unitWidth;
elStyle.height = rect.h + unitHeight;
elStyle[keyWidth] = rect.w + unitWidth;
elStyle[keyHeight] = rect.h + unitHeight;
}
const unitRect = 'px';

Loading…
Cancel
Save