Fait le de manière à se que je puisse modélisé moi même avec des fonctionnalités comme dans le vrai solidwork comme le brossage,les cotations ect.....
76a620b verified Download components/tooltip.js from Kdkdhdhfdk/solidworks-mini-maker: direct link, hf CLI and curl.
- Browser
- Download file 785 Bytes
-
https://huggingface.co/spaces/Kdkdhdhfdk/solidworks-mini-maker/resolve/main/components/tooltip.js
- Command line
-
hf download hf://spaces/Kdkdhdhfdk/solidworks-mini-maker/components/tooltip.js
-
curl -L -o tooltip.js https://huggingface.co/spaces/Kdkdhdhfdk/solidworks-mini-maker/resolve/main/components/tooltip.js
785 Bytes
| class TooltipElement extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| position: absolute; | |
| background: rgba(0,0,0,0.7); | |
| color: white; | |
| padding: 4px 8px; | |
| border-radius: 4px; | |
| font-size: 12px; | |
| pointer-events: none; | |
| z-index: 100; | |
| transform: translate(10px, 10px); | |
| display: none; | |
| } | |
| </style> | |
| <slot></slot> | |
| `; | |
| } | |
| show(x, y, text) { | |
| this.style.display = 'block'; | |
| this.style.left = `${x}px`; | |
| this.style.top = `${y}px`; | |
| this.textContent = text; | |
| } | |
| hide() { | |
| this.style.display = 'none'; | |
| } | |
| } | |
| customElements.define('tool-tip', TooltipElement); |