Skip to content

Commit

Permalink
fix: dom-helper api change (#4848)
Browse files Browse the repository at this point in the history
* fix: dom-helper api change

* Update BootstrapModalManager.js
  • Loading branch information
jquense committed Nov 20, 2019
1 parent 16851ff commit f84b1b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/BootstrapModalManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ export default class BootstrapModalManager extends ModalManager {
adjustAndStore = (prop, element, adjust) => {
const actual = element.style[prop];
element.dataset[prop] = actual;
css(element, prop, `${parseFloat(css(element, prop)) + adjust}px`);
css(element, {
[prop]: `${parseFloat(css(element, prop)) + adjust}px`,
});
};

restore = (prop, element) => {
const value = element.dataset[prop];
if (value !== undefined) {
delete element.dataset[prop];
css(element, prop, value);
css(element, { [prop]: value });
}
};

Expand Down

0 comments on commit f84b1b2

Please sign in to comment.