fix not being able to remove transition
This commit is contained in:
parent
473c5726b3
commit
b36d4c8a76
|
@ -488,10 +488,10 @@ export const getFrontendStore = () => {
|
|||
selected._styles = { normal: {}, hover: {}, active: {} }
|
||||
await store.actions.preview.saveSelected()
|
||||
},
|
||||
updateTransition: async (transition) => {
|
||||
updateTransition: async transition => {
|
||||
const selected = get(selectedComponent)
|
||||
if (transition == null || transition === "") {
|
||||
selected = ""
|
||||
selected._transition = ""
|
||||
} else {
|
||||
selected._transition = transition
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { fade, blur, slide, fly } from 'svelte/transition'
|
||||
import { fade, blur, slide, fly } from "svelte/transition"
|
||||
|
||||
// Default options
|
||||
const transitions = new Map([
|
||||
|
@ -9,7 +9,7 @@ const transitions = new Map([
|
|||
["fly", { tn: fly, opt: { y: 80 } }],
|
||||
])
|
||||
|
||||
export default function transition(node, {type, options = {}}) {
|
||||
export default function transition(node, { type, options = {} }) {
|
||||
const { tn, opt } = transitions.get(type) || {}
|
||||
return tn ? tn(node, {...opt, ...options}) : fade(node, { duration: 0})
|
||||
return tn ? tn(node, { ...opt, ...options }) : fade(node, { duration: 0 })
|
||||
}
|
Loading…
Reference in New Issue