Update BDFDB.max.js

This commit is contained in:
Mirco Wittrien 2019-09-09 15:16:08 +02:00
parent 70c02647f4
commit be295ee604
1 changed files with 9 additions and 9 deletions

View File

@ -1620,11 +1620,11 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
if (instance && menu && returnvalue) { if (instance && menu && returnvalue) {
if (type && typeof plugin[`on${type}ContextMenu`] === 'function') { if (type && typeof plugin[`on${type}ContextMenu`] === 'function') {
plugin[`on${type}ContextMenu`](instance, menu, returnvalue); plugin[`on${type}ContextMenu`](instance, menu, returnvalue);
instance.forceUpdate(); if (!instance.BDFDBforceUpdateTimeout && typeof instance.forceUpdate == 'function') instance.forceUpdate();
} }
else if (!type && typeof plugin[`onContextMenu`] === 'function') { else if (!type && typeof plugin[`onContextMenu`] === 'function') {
plugin[`onContextMenu`](instance, menu, returnvalue); plugin[`onContextMenu`](instance, menu, returnvalue);
instance.forceUpdate(); if (!instance.BDFDBforceUpdateTimeout && typeof instance.forceUpdate == 'function') instance.forceUpdate();
} }
} }
}}); }});
@ -1635,7 +1635,7 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
if (instance && popout && returnvalue) { if (instance && popout && returnvalue) {
if (type && typeof plugin[`on${type}Popout`] === 'function') { if (type && typeof plugin[`on${type}Popout`] === 'function') {
plugin[`on${type}Popout`](instance, popout, returnvalue); plugin[`on${type}Popout`](instance, popout, returnvalue);
instance.forceUpdate(); if (!instance.BDFDBforceUpdateTimeout && typeof instance.forceUpdate == 'function') instance.forceUpdate();
} }
} }
}}); }});
@ -1644,14 +1644,14 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
var BDFDBpatchContextMenuModule = function (module) { var BDFDBpatchContextMenuModule = function (module) {
if (module && module.prototype) { if (module && module.prototype) {
BDFDB.WebModules.patch(module.prototype, 'componentDidMount', BDFDB, {after: e => { BDFDB.WebModules.patch(module.prototype, 'componentDidMount', BDFDB, {after: e => {
if (!e.thisObject.BDFDBforceRenderTimeout && typeof e.thisObject.render == 'function') e.thisObject.render(); if (!e.thisObject.BDFDBforceRenderTimeout && !e.thisObject.BDFDBforceUpdateTimeout && typeof e.thisObject.render == 'function') e.thisObject.render();
}}); }});
BDFDB.WebModules.patch(module.prototype, 'componentDidUpdate', BDFDB, {after: e => { BDFDB.WebModules.patch(module.prototype, 'componentDidUpdate', BDFDB, {after: e => {
const updater = BDFDB.getReactValue(e, 'thisObject._reactInternalFiber.stateNode.props.onHeightUpdate'); const updater = BDFDB.getReactValue(e, 'thisObject._reactInternalFiber.stateNode.props.onHeightUpdate');
if (updater) updater(); if (updater) updater();
BDFDB.initElements(BDFDB.React.findDOMNodeSafe(e.thisObject)); BDFDB.initElements(BDFDB.React.findDOMNodeSafe(e.thisObject));
e.thisObject.BDFDBforceRenderTimeout = true; e.thisObject.BDFDBforceUpdateTimeout = true;
setTimeout(() => {delete e.thisObject.BDFDBforceRenderTimeout;}, 1000); setTimeout(() => {delete e.thisObject.BDFDBforceUpdateTimeout;}, 1000);
}}); }});
BDFDB.WebModules.patch(module.prototype, 'render', BDFDB, {after: e => { BDFDB.WebModules.patch(module.prototype, 'render', BDFDB, {after: e => {
if (BDFDB.React.findDOMNodeSafe(e.thisObject)) { if (BDFDB.React.findDOMNodeSafe(e.thisObject)) {
@ -1664,13 +1664,13 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
var BDFDBpatchPopoutModule = function (module) { var BDFDBpatchPopoutModule = function (module) {
if (module && module.prototype) { if (module && module.prototype) {
BDFDB.WebModules.patch(module.prototype, 'componentDidMount', BDFDB, {after: e => { BDFDB.WebModules.patch(module.prototype, 'componentDidMount', BDFDB, {after: e => {
if (!e.thisObject.BDFDBforceRenderTimeout && typeof e.thisObject.render == 'function') e.thisObject.render(); if (!e.thisObject.BDFDBforceRenderTimeout && !e.thisObject.BDFDBforceUpdateTimeout && typeof e.thisObject.render == 'function') e.thisObject.render();
}}); }});
BDFDB.WebModules.patch(module.prototype, 'componentDidUpdate', BDFDB, {after: e => { BDFDB.WebModules.patch(module.prototype, 'componentDidUpdate', BDFDB, {after: e => {
const updater = BDFDB.getReactValue(e, 'thisObject._reactInternalFiber.return.return.return.stateNode.updateOffsets'); const updater = BDFDB.getReactValue(e, 'thisObject._reactInternalFiber.return.return.return.stateNode.updateOffsets');
if (updater) updater(); if (updater) updater();
e.thisObject.BDFDBforceRenderTimeout = true; e.thisObject.BDFDBforceUpdateTimeout = true;
setTimeout(() => {delete e.thisObject.BDFDBforceRenderTimeout;}, 1000); setTimeout(() => {delete e.thisObject.BDFDBforceUpdateTimeout;}, 1000);
}}); }});
BDFDB.WebModules.patch(module.prototype, 'render', BDFDB, {after: e => { BDFDB.WebModules.patch(module.prototype, 'render', BDFDB, {after: e => {
if (BDFDB.React.findDOMNodeSafe(e.thisObject)) { if (BDFDB.React.findDOMNodeSafe(e.thisObject)) {