mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-04-28 16:29:11 -05:00
components now track their parent
This commit is contained in:
@@ -47,7 +47,7 @@ class AppContext {
|
||||
];
|
||||
|
||||
if (utils.isElectron()) {
|
||||
this.components.push(new ZoomService(this));
|
||||
this.components.push(new ZoomService(this, this));
|
||||
|
||||
import("./spell_check.js").then(spellCheckService => spellCheckService.initSpellCheck());
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import appContext from "./app_context.js";
|
||||
import Component from "../widgets/component.js";
|
||||
|
||||
export default class Entrypoints extends Component {
|
||||
constructor(appContext) {
|
||||
super(appContext);
|
||||
constructor(appContext, parent) {
|
||||
super(appContext, parent);
|
||||
|
||||
// hot keys are active also inside inputs and content editables
|
||||
jQuery.hotkeys.options.filterInputAcceptingElements = false;
|
||||
|
||||
@@ -15,7 +15,7 @@ class TabContext extends Component {
|
||||
* @param {string|null} tabId
|
||||
*/
|
||||
constructor(appContext, tabId = null) {
|
||||
super(appContext);
|
||||
super(appContext, parent);
|
||||
|
||||
this.tabId = tabId || utils.randomString(4);
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import utils from "./utils.js";
|
||||
import TabContext from "./tab_context.js";
|
||||
|
||||
export default class TabManager extends Component {
|
||||
constructor(appContext) {
|
||||
super(appContext);
|
||||
constructor(appContext, parent) {
|
||||
super(appContext, parent);
|
||||
|
||||
this.activeTabId = null;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ const MIN_ZOOM = 0.5;
|
||||
const MAX_ZOOM = 2.0;
|
||||
|
||||
export default class ZoomService extends Component {
|
||||
constructor(appContext) {
|
||||
super(appContext);
|
||||
constructor(appContext, parent) {
|
||||
super(appContext, parent);
|
||||
|
||||
this.setZoomFactor(options.getFloat('zoomFactor'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user