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
+7 -6
View File
@@ -423,7 +423,7 @@ __PluginManager__.register('menu',function(module, exports, require) {
};
Menu.prototype.reInit = function (recursiveCalcStyle = false) {
// console.warn('Menu: reInit ' + this.id);
console.warn('Menu: reInit ' + this.id);
if(this.bInit === false) {
return;
}
@@ -432,14 +432,15 @@ __PluginManager__.register('menu',function(module, exports, require) {
this.removeParentEventListener();
//this.removeDocumentEventListener();
this.removeAnimation();
//this.removeAnimation();
this.node.remove();
if(this.node.parentElement !== this.options.parent) {
this.node.remove();
this.options.parent.prepend(this.getNode());
}
this.render();
this.options.parent.prepend(this.getNode());
if(this.bActive) {
this.calcStyle(recursiveCalcStyle);
this.showNode();
@@ -830,7 +831,7 @@ __PluginManager__.register('menu',function(module, exports, require) {
return Menu;
})();
var getInstance = function(options = {}, items = []) {
if(options instanceof Menu) {
if(options instanceof MenuClass) {
return options;
}
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>