BIG UPDATE: can now change the entites position in front

This commit is contained in:
2024-04-09 15:56:23 +02:00
parent 052a37d714
commit 9aecfc62e9
8 changed files with 336 additions and 92 deletions

View File

@@ -156,7 +156,7 @@ export default {
// over highlight effect on paper items
if (n && n.paper_id) {
let nitem = paper.project.getItem({id: n.paper_id});
console.log('watch hover_element nitem', nitem.definition);
// console.log('watch hover_element nitem', nitem.definition);
if (!nitem.is_symbol_instance) { // not symbol instance
nitem.bringToFront();
if (nitem.strokeColor) {
@@ -168,7 +168,7 @@ export default {
}
} else { // is a symbol instanceof, then swap
console.log(`symbol instance n.type:${n.type}, nitem`, nitem);
// console.log(`symbol instance n.type:${n.type}, nitem`, nitem);
switch (n.type) {
case 'entite':
nitem.definition = this.paper_symbol_definitions.entite_hover;
@@ -189,7 +189,7 @@ export default {
if (o && o.paper_id && (!n || o.paper_id !== n.paper_id)) {
let oitem = paper.project.getItem({id: o.paper_id})
if (oitem) {
console.log('watch hover_element oitem', 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;
@@ -197,7 +197,7 @@ export default {
oitem.fillColor = oitem.data.prevFillColor;
}
} else { // is a symbol instanceof, then swap
console.log(`symbol instance o.type:${o.type}, oitem`, oitem);
// console.log(`symbol instance o.type:${o.type}, oitem`, oitem);
switch (o.type) {
case 'entite':
// console.log('this.opened_entite_id', parseInt(this.opened_entite_id), 'oitem.item_id', oitem.item_id);
@@ -448,7 +448,7 @@ export default {
// }
// cercle exterieur
let ext_circle_factor = 0.915;
let ext_circle_factor = 0.915; // be eware that concernement map item also use this factor
children.push(new paper.Path.Circle({
center: [pos.x, pos.y],
radius: ray*ext_circle_factor,