created paper contents once concernement opened and not on init, UI should be smoother #2150
This commit is contained in:
@@ -161,28 +161,30 @@ export default {
|
||||
|
||||
if (o && o.paper_id && (!n || o.paper_id !== n.paper_id)) {
|
||||
let oitem = paper.project.getItem({id: o.paper_id})
|
||||
console.log('watch hover_element oitem', oitem);
|
||||
if (!oitem.is_symbol_instance) { // not symbol instance
|
||||
if (oitem.data.prevStrokeColor) {
|
||||
oitem.strokeColor = oitem.data.prevStrokeColor;
|
||||
} else {
|
||||
oitem.fillColor = oitem.data.prevFillColor;
|
||||
}
|
||||
} else { // is a symbol instanceof, then swap
|
||||
console.log(`symbol instance o.type:${o.type}, oitem`, oitem);
|
||||
switch (o.type) {
|
||||
case 'entite':
|
||||
oitem.definition = this.paper_symbol_definitions.entite;
|
||||
break;
|
||||
case 'besoin':
|
||||
oitem.definition = this.paper_symbol_definitions.besoin;
|
||||
break;
|
||||
case 'reponse':
|
||||
oitem.definition = this.paper_symbol_definitions.reponse;
|
||||
break;
|
||||
case 'entite_action':
|
||||
oitem.definition = this.paper_symbol_definitions.entite_action;
|
||||
break;
|
||||
if (oitem) {
|
||||
console.log('watch hover_element oitem', oitem);
|
||||
if (!oitem.is_symbol_instance) { // not symbol instance
|
||||
if (oitem.data.prevStrokeColor) {
|
||||
oitem.strokeColor = oitem.data.prevStrokeColor;
|
||||
} else {
|
||||
oitem.fillColor = oitem.data.prevFillColor;
|
||||
}
|
||||
} else { // is a symbol instanceof, then swap
|
||||
console.log(`symbol instance o.type:${o.type}, oitem`, oitem);
|
||||
switch (o.type) {
|
||||
case 'entite':
|
||||
oitem.definition = this.paper_symbol_definitions.entite;
|
||||
break;
|
||||
case 'besoin':
|
||||
oitem.definition = this.paper_symbol_definitions.besoin;
|
||||
break;
|
||||
case 'reponse':
|
||||
oitem.definition = this.paper_symbol_definitions.reponse;
|
||||
break;
|
||||
case 'entite_action':
|
||||
oitem.definition = this.paper_symbol_definitions.entite_action;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,11 +899,11 @@ export default {
|
||||
},
|
||||
setPaperEntiteActionSymbol(){
|
||||
let svgIcon = paper.project.importSVG(iconAction);
|
||||
svgIcon.strokeColor = '#000';
|
||||
svgIcon.strokeWidth = 0.25;
|
||||
svgIcon.scale(0.15);
|
||||
svgIcon.strokeColor = '#000';
|
||||
svgIcon.fillColor = null;
|
||||
svgIcon.position = {x:0, y:0};
|
||||
svgIcon.scale(0.15);
|
||||
|
||||
let circle = new paper.Path.Circle({
|
||||
radius: 3,
|
||||
@@ -916,12 +918,13 @@ export default {
|
||||
setPaperEntiteActionHoverSymbol(){
|
||||
let svgIcon = paper.project.importSVG(iconAction);
|
||||
svgIcon.strokeColor = '#01ffe2';
|
||||
svgIcon.strokeWidth = 0.75;
|
||||
svgIcon.strokeWidth = 0.25;
|
||||
svgIcon.scale(0.15);
|
||||
svgIcon.fillColor = null;
|
||||
svgIcon.position = {x:0, y:0};
|
||||
|
||||
let circle = new paper.Path.Circle({
|
||||
radius: 15,
|
||||
radius: 3,
|
||||
fillColor: 'rgba(255,255,255,0.05)'
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user