minimize inline style usage
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import drag from '$lib/actions/drag';
|
||||
|
||||
import type { NodeSelectionProps } from './types';
|
||||
import { toPxString } from '$lib/utils';
|
||||
|
||||
let {
|
||||
store = $bindable(),
|
||||
@@ -38,7 +39,9 @@
|
||||
{#if store.selectionRectMode === 'nodes' && bounds && isNumeric(bounds.x) && isNumeric(bounds.y)}
|
||||
<div
|
||||
class="selection-wrapper nopan"
|
||||
style="width: {bounds.width}px; height: {bounds.height}px; transform: translate({bounds.x}px, {bounds.y}px)"
|
||||
style:width={toPxString(bounds.width)}
|
||||
style:height={toPxString(bounds.height)}
|
||||
style:transform="translate({bounds.x}px, {bounds.y}px)"
|
||||
use:drag={{
|
||||
disabled: false,
|
||||
store,
|
||||
|
||||
Reference in New Issue
Block a user