mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47:56 +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",
|
||||
"version": "0.4.8",
|
||||
"version": "0.4.9",
|
||||
"description": "WiseMapping - Mindplot Canvas Library",
|
||||
"homepage": "http://www.wisemapping.org/",
|
||||
"main": "dist/main.js",
|
||||
|
@ -22,6 +22,7 @@ import ActionDispatcher from './ActionDispatcher';
|
||||
|
||||
class ShirinkConnector {
|
||||
constructor(topic) {
|
||||
this._isShrink = false;
|
||||
const ellipse = new Elipse(TopicConfig.INNER_RECT_ATTRIBUTES);
|
||||
this._ellipse = ellipse;
|
||||
ellipse.setFill('rgb(62,118,179)');
|
||||
@ -49,12 +50,11 @@ class ShirinkConnector {
|
||||
});
|
||||
|
||||
ellipse.addEvent('mouseover', () => {
|
||||
ellipse.setFill('rgb(153, 0, 255)');
|
||||
ellipse.setStroke(this._isShrink ? 1 : 2, 'solid');
|
||||
});
|
||||
const me = this;
|
||||
|
||||
ellipse.addEvent('mouseout', () => {
|
||||
const color = topic.getBackgroundColor();
|
||||
me.setFill(color);
|
||||
ellipse.setStroke(this._isShrink ? 2 : 1, 'solid');
|
||||
});
|
||||
|
||||
ellipse.setCursor('default');
|
||||
@ -70,6 +70,7 @@ class ShirinkConnector {
|
||||
} else {
|
||||
elipse.setStroke('1', 'solid');
|
||||
}
|
||||
this._isShrink = isShrink;
|
||||
}
|
||||
|
||||
setVisibility(value) {
|
||||
|
@ -110,6 +110,11 @@ class Topic extends NodeGraph {
|
||||
if ($defined(updateModel) && updateModel) {
|
||||
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();
|
||||
if (oldInnerShape != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user