This commit is contained in:
2021-09-29 19:15:10 +03:00
parent bf74cd1618
commit dee5c19f48
2 changed files with 16 additions and 6 deletions
+6 -5
View File
@@ -423,7 +423,7 @@ __PluginManager__.register('menu',function(module, exports, require) {
}; };
Menu.prototype.reInit = function (recursiveCalcStyle = false) { Menu.prototype.reInit = function (recursiveCalcStyle = false) {
// console.warn('Menu: reInit ' + this.id); console.warn('Menu: reInit ' + this.id);
if(this.bInit === false) { if(this.bInit === false) {
return; return;
} }
@@ -432,14 +432,15 @@ __PluginManager__.register('menu',function(module, exports, require) {
this.removeParentEventListener(); this.removeParentEventListener();
//this.removeDocumentEventListener(); //this.removeDocumentEventListener();
this.removeAnimation(); //this.removeAnimation();
if(this.node.parentElement !== this.options.parent) {
this.node.remove(); this.node.remove();
this.options.parent.prepend(this.getNode());
}
this.render(); this.render();
this.options.parent.prepend(this.getNode());
if(this.bActive) { if(this.bActive) {
this.calcStyle(recursiveCalcStyle); this.calcStyle(recursiveCalcStyle);
this.showNode(); this.showNode();
@@ -830,7 +831,7 @@ __PluginManager__.register('menu',function(module, exports, require) {
return Menu; return Menu;
})(); })();
var getInstance = function(options = {}, items = []) { var getInstance = function(options = {}, items = []) {
if(options instanceof Menu) { if(options instanceof MenuClass) {
return options; return options;
} }
if(typeof options === 'string') { if(typeof options === 'string') {
+9
View File
@@ -0,0 +1,9 @@
<div style="display: flex; flex-direction: column; align-items: center;">
<a href="menu.php">Menu</a>
<a href="templates.svg.php">templates.svg</a>
<a href="flex-kit.php">flex-kit</a>
<a href="cheatsheet.php">cheatsheet</a>
<a href="card/block.php">card/block</a>
</div>