mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-14 03:07:57 +01:00
Fix _adjustSize missing
This commit is contained in:
parent
645a40d3f7
commit
3df835081c
@ -179,7 +179,7 @@ class StandaloneActionDispatcher extends ActionDispatcher {
|
||||
$assert(topicsIds, 'topicIds can not be null');
|
||||
$assert(color, 'topicIds can not be null');
|
||||
|
||||
const commandFunc = (topic, commandColor) => {
|
||||
const commandFunc = (topic: Topic, commandColor: string) => {
|
||||
const result = topic.getBorderColor();
|
||||
topic.setBorderColor(commandColor);
|
||||
return result;
|
||||
@ -212,9 +212,9 @@ class StandaloneActionDispatcher extends ActionDispatcher {
|
||||
$assert(topicsIds, 'topicsIds can not be null');
|
||||
$assert(shapeType, 'shapeType can not be null');
|
||||
|
||||
const commandFunc = (topic, commandShapeType) => {
|
||||
const commandFunc = (topic: Topic, commandShapeType: string) => {
|
||||
const result = topic.getShapeType();
|
||||
topic.setShapeType(commandShapeType, true);
|
||||
topic.setShapeType(commandShapeType);
|
||||
return result;
|
||||
};
|
||||
|
||||
@ -226,12 +226,12 @@ class StandaloneActionDispatcher extends ActionDispatcher {
|
||||
changeFontWeightToTopic(topicsIds: number[]) {
|
||||
$assert(topicsIds, 'topicsIds can not be null');
|
||||
|
||||
const commandFunc = (topic) => {
|
||||
const commandFunc = (topic: Topic) => {
|
||||
const result = topic.getFontWeight();
|
||||
const weight = result === 'bold' ? 'normal' : 'bold';
|
||||
topic.setFontWeight(weight, true);
|
||||
|
||||
topic._adjustShapes();
|
||||
topic.adjustShapes();
|
||||
return result;
|
||||
};
|
||||
|
||||
|
@ -104,15 +104,10 @@ abstract class Topic extends NodeGraph {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} type the topic shape type
|
||||
* @see {@link mindplot.model.INodeModel}
|
||||
*/
|
||||
setShapeType(type) {
|
||||
setShapeType(type: string): void {
|
||||
this._setShapeType(type, true);
|
||||
}
|
||||
|
||||
/** @return {mindplot.Topic} parent topic */
|
||||
getParent(): Topic | null {
|
||||
return this._parent;
|
||||
}
|
||||
@ -162,7 +157,7 @@ abstract class Topic extends NodeGraph {
|
||||
}
|
||||
|
||||
/** @return {String} topic shape type */
|
||||
getShapeType() {
|
||||
getShapeType(): string {
|
||||
const model = this.getModel();
|
||||
let result = model.getShapeType();
|
||||
if (!$defined(result)) {
|
||||
|
Loading…
Reference in New Issue
Block a user