remove unused things

This commit is contained in:
Keviin Åberg Kultalahti 2021-02-26 14:39:44 +01:00
parent 51b517a4be
commit 10972fafe2
1 changed files with 10 additions and 15 deletions

View File

@ -12,10 +12,8 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
export let bindableProperties
export let value = "" export let value = ""
export let bindingDrawer export let bindingDrawer
export let valid = true
export let bindings = [] export let bindings = []
let originalValue = value let originalValue = value
@ -26,10 +24,7 @@
$: categories = Object.entries(groupBy("category", bindings)) $: categories = Object.entries(groupBy("category", bindings))
$: value && checkValid() $: value && checkValid()
$: bindableProperties = getBindableProperties(
$currentAsset,
$store.selectedComponentId
)
$: console.log(value) $: console.log(value)
$: dispatch("update", value) $: dispatch("update", value)
$: searchRgx = new RegExp(search, "ig") $: searchRgx = new RegExp(search, "ig")
@ -40,16 +35,16 @@
} }
function addToText(binding) { function addToText(binding) {
const position = getCaretPosition() const position = getCaretPosition()
const toAdd = `{{ ${binding.path} }}` const toAdd = `{{ ${binding.path} }}`
if (position.start) { if (position.start) {
value = value =
value.substring(0, position.start) + value.substring(0, position.start) +
toAdd + toAdd +
value.substring(position.end, value.length) value.substring(position.end, value.length)
} else { } else {
value += toAdd value += toAdd
} }
} }
export function cancel() { export function cancel() {
dispatch("update", originalValue) dispatch("update", originalValue)