import Moveable from "lit-moveable"; import { LitElement, html } from "lit"; import { customElement, property } from "lit/decorators.js"; import { ref, createRef } from "lit/directives/ref.js"; @customElement("lit-app") export default class App extends LitElement { snappable: any = "$preview_snappable"; isDisplaySnapDigit: any = "$preview_isDisplaySnapDigit"; isDisplayInnerSnapDigit: any = "$preview_isDisplayInnerSnapDigit"; snapGap: any = "$preview_snapGap"; snapDirections: any = "$preview_snapDirections"; elementSnapDirections: any = "$preview_elementSnapDirections"; snapThreshold: any = "$preview_snapThreshold"; maxSnapElementGuidelineDistance: any = "$preview_maxSnapElementGuidelineDistance"; targetRef: Ref = createRef(null); moveableRef: Ref = createRef(null); render() { return html `
Element1
Element2
Element3
Target
`; } onRender(e) { e.target.style.cssText += e.cssText; } onSnap(e) { console.log(e.guidelines, e.elements); } }