updateComponentProp(component.id, 'bindKey', value)"
- :ref="el => { if (el) componentRefs[component.id] = el; }"
+ @pin-click="(pinInfo: any) => handlePinClick(component.id, pinInfo, pinInfo.originalEvent)"
+ :ref="(el: any) => { if (el) componentRefs[component.id] = el; }"
/>
@@ -45,6 +80,7 @@
+
+
diff --git a/src/components/equipments/Pin.vue b/src/components/equipments/Pin.vue
index fc637a5..ff4e20e 100644
--- a/src/components/equipments/Pin.vue
+++ b/src/components/equipments/Pin.vue
@@ -5,15 +5,18 @@
:height="height"
:viewBox="'0 0 ' + viewBoxWidth + ' ' + viewBoxHeight"
class="pin-component"
+ :data-pin-id="props.label"
>
-
-
-
-
+
+ r="3.75"
+ @mouseenter="showPinTooltip"
+ @mouseleave="hidePinTooltip"
+ @click.stop="handlePinClick"
+ :data-pin-id="`${props.label}-${props.constraint}`" />
@@ -25,31 +28,52 @@
height="25"
x="0"
y="0"
- rx="2.5" />
-
+ r="3.75"
+ @mouseenter="showPinTooltip"
+ @mouseleave="hidePinTooltip"
+ @click.stop="handlePinClick"
+ :data-pin-id="`${props.label}-${props.constraint}`" />
{{ props.label }}
-
-
+
{{ props.label }}
-
-
+
+
+
+
+ {{ tooltipText }}
+
@@ -120,6 +264,7 @@ defineExpose({
.pin-component {
display: block;
user-select: none;
+ position: relative;
}
.interactive {
cursor: pointer;
@@ -128,4 +273,15 @@ defineExpose({
.interactive:hover {
filter: brightness(1.2);
}
+.pin-tooltip {
+ background-color: rgba(0, 0, 0, 0.8);
+ color: white;
+ padding: 4px 8px;
+ border-radius: 4px;
+ font-size: 12px;
+ z-index: 1000;
+ pointer-events: none;
+ white-space: nowrap;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+}
diff --git a/src/views/ProjectView.vue b/src/views/ProjectView.vue
index cb0856f..e475bdb 100644
--- a/src/views/ProjectView.vue
+++ b/src/views/ProjectView.vue
@@ -4,11 +4,12 @@