mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-14 11:17:57 +01:00
Fix change font regression
This commit is contained in:
parent
a0a5beb2ec
commit
934d127012
@ -55,6 +55,7 @@ import NodeModel from './model/NodeModel';
|
|||||||
import Topic from './Topic';
|
import Topic from './Topic';
|
||||||
import Point from '@wisemapping/web2d';
|
import Point from '@wisemapping/web2d';
|
||||||
import { DesignerOptions } from './DesignerOptions';
|
import { DesignerOptions } from './DesignerOptions';
|
||||||
|
import MainTopic from './MainTopic';
|
||||||
|
|
||||||
class Designer extends Events {
|
class Designer extends Events {
|
||||||
private _mindmap: Mindmap;
|
private _mindmap: Mindmap;
|
||||||
@ -227,14 +228,7 @@ class Designer extends Events {
|
|||||||
this._workspace.setZoom(model.getZoom(), true);
|
this._workspace.setZoom(model.getZoom(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private _buildNodeGraph(model: NodeModel, readOnly: boolean): MainTopic {
|
||||||
* @private
|
|
||||||
* @param {mindplot.model.NodeModel} model
|
|
||||||
* @param {Boolean} readOnly
|
|
||||||
* @return {mindplot.CentralTopic|mindplot.MainTopic} the topic to the given model,
|
|
||||||
* connected, added to the drag manager, with events registered - complying type & read mode
|
|
||||||
*/
|
|
||||||
_buildNodeGraph(model: NodeModel, readOnly: boolean) {
|
|
||||||
// Create node graph ...
|
// Create node graph ...
|
||||||
const topic = create(model, { readOnly });
|
const topic = create(model, { readOnly });
|
||||||
this.getModel().addTopic(topic);
|
this.getModel().addTopic(topic);
|
||||||
@ -344,10 +338,6 @@ class Designer extends Events {
|
|||||||
this._workspace.setZoom(zoom);
|
this._workspace.setZoom(zoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {Number=} factor
|
|
||||||
* zoom out by the given factor, or 1.2, if undefined
|
|
||||||
*/
|
|
||||||
zoomOut(factor: number = 1.2) {
|
zoomOut(factor: number = 1.2) {
|
||||||
const model = this.getModel();
|
const model = this.getModel();
|
||||||
const scale = model.getZoom() * factor;
|
const scale = model.getZoom() * factor;
|
||||||
|
@ -40,7 +40,7 @@ class DesignerModel extends Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @param {Number} zoom number between 0.3 and 1.9 to set the zoom to */
|
/** @param {Number} zoom number between 0.3 and 1.9 to set the zoom to */
|
||||||
setZoom(zoom) {
|
setZoom(zoom:number) {
|
||||||
this._zoom = zoom;
|
this._zoom = zoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,11 +27,14 @@ class ListToolbarPanel extends ToolbarPaneItem {
|
|||||||
|
|
||||||
_initPanel() {
|
_initPanel() {
|
||||||
// Register on toolbar elements ...
|
// Register on toolbar elements ...
|
||||||
this.getPanelElem().children('div').bind('click', (event) => {
|
const me = this;
|
||||||
|
this.getPanelElem()
|
||||||
|
.children('div')
|
||||||
|
.bind('click', function click(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
this.hide();
|
me.hide();
|
||||||
const value = $defined($(this).attr('model')) ? $(this).attr('model') : $(this).attr('id');
|
const value = $defined($(this).attr('model')) ? $(this).attr('model') : $(this).attr('id');
|
||||||
this.getModel().setValue(value);
|
me.getModel().setValue(value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user