mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-25 23:54:55 +01:00
Remove background color when change to line shape
This commit is contained in:
parent
110005be4b
commit
36aa4fc7ab
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@wisemapping/mindplot",
|
"name": "@wisemapping/mindplot",
|
||||||
"version": "0.4.8",
|
"version": "0.4.9",
|
||||||
"description": "WiseMapping - Mindplot Canvas Library",
|
"description": "WiseMapping - Mindplot Canvas Library",
|
||||||
"homepage": "http://www.wisemapping.org/",
|
"homepage": "http://www.wisemapping.org/",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
|
@ -22,6 +22,7 @@ import ActionDispatcher from './ActionDispatcher';
|
|||||||
|
|
||||||
class ShirinkConnector {
|
class ShirinkConnector {
|
||||||
constructor(topic) {
|
constructor(topic) {
|
||||||
|
this._isShrink = false;
|
||||||
const ellipse = new Elipse(TopicConfig.INNER_RECT_ATTRIBUTES);
|
const ellipse = new Elipse(TopicConfig.INNER_RECT_ATTRIBUTES);
|
||||||
this._ellipse = ellipse;
|
this._ellipse = ellipse;
|
||||||
ellipse.setFill('rgb(62,118,179)');
|
ellipse.setFill('rgb(62,118,179)');
|
||||||
@ -49,12 +50,11 @@ class ShirinkConnector {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ellipse.addEvent('mouseover', () => {
|
ellipse.addEvent('mouseover', () => {
|
||||||
ellipse.setFill('rgb(153, 0, 255)');
|
ellipse.setStroke(this._isShrink ? 1 : 2, 'solid');
|
||||||
});
|
});
|
||||||
const me = this;
|
|
||||||
ellipse.addEvent('mouseout', () => {
|
ellipse.addEvent('mouseout', () => {
|
||||||
const color = topic.getBackgroundColor();
|
ellipse.setStroke(this._isShrink ? 2 : 1, 'solid');
|
||||||
me.setFill(color);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ellipse.setCursor('default');
|
ellipse.setCursor('default');
|
||||||
@ -70,6 +70,7 @@ class ShirinkConnector {
|
|||||||
} else {
|
} else {
|
||||||
elipse.setStroke('1', 'solid');
|
elipse.setStroke('1', 'solid');
|
||||||
}
|
}
|
||||||
|
this._isShrink = isShrink;
|
||||||
}
|
}
|
||||||
|
|
||||||
setVisibility(value) {
|
setVisibility(value) {
|
||||||
|
@ -110,6 +110,11 @@ class Topic extends NodeGraph {
|
|||||||
if ($defined(updateModel) && updateModel) {
|
if ($defined(updateModel) && updateModel) {
|
||||||
model.setShapeType(type);
|
model.setShapeType(type);
|
||||||
}
|
}
|
||||||
|
// If shape is line, reset background color to default.
|
||||||
|
if (type === TopicShape.LINE) {
|
||||||
|
const color = TopicStyle.defaultBackgroundColor(this);
|
||||||
|
this.setBackgroundColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
const oldInnerShape = this.getInnerShape();
|
const oldInnerShape = this.getInnerShape();
|
||||||
if (oldInnerShape != null) {
|
if (oldInnerShape != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user