mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	layout changes WIP
This commit is contained in:
		| @@ -2,19 +2,19 @@ import utils from '../services/utils.js'; | ||||
| import Mutex from "../services/mutex.js"; | ||||
|  | ||||
| export default class Component { | ||||
|     /** | ||||
|      * @param {Component} parent | ||||
|      */ | ||||
|     constructor(parent) { | ||||
|     constructor() { | ||||
|         this.componentId = `comp-${this.constructor.name}-` + utils.randomString(6); | ||||
|         /** @type Component */ | ||||
|         this.parent = parent; | ||||
|         /** @type Component[] */ | ||||
|         this.children = []; | ||||
|         this.initialized = Promise.resolve(); | ||||
|         this.mutex = new Mutex(); | ||||
|     } | ||||
|  | ||||
|     setParent(parent) { | ||||
|         /** @type Component */ | ||||
|         this.parent = parent; | ||||
|     } | ||||
|  | ||||
|     async handleEvent(name, data) { | ||||
|         await this.initialized; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user