Closed zeaccs closed 3 years ago
nice! looks great so far 💯
observers are watching and ready for hooks to update label text, i tested out locally and these changes worked out well. thoughts?
// selectable.js
const setLabel = (el, label) => {
label.text = handleLabelText(el, visbug.activeTool)
label.update = {boundingRect: el.getBoundingClientRect(), isFixed: isFixed(el)}
}
// label.element.js
set text(content) {
this.$shadow.childElementCount
? this.$shadow.firstElementChild.textContent = content
: this._text = content
}
oh, that makes sense.
Rendered output for reference:
follow up on #36, right now the function handles hover/click events and gets the computed property, maybe need an observer or callback later for styles changes during
data-selected
.