Lint and prevent scrolling to selected component when starting dragging

This commit is contained in:
Andrew Kingston 2022-10-14 19:45:47 +01:00
parent adc7e8e5fc
commit d166cbb466
3 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import { get, writable } from "svelte/store"
import { cloneDeep } from "lodash/fp"
import { selectedScreen, selectedComponent, store } from "builderStore"
import { selectedScreen, selectedComponent } from "builderStore"
import {
datasources,
integrations,

View File

@ -421,7 +421,11 @@
}
const scrollIntoView = () => {
return
// Don't scroll into view if we selected this component because we were
// starting dragging on it
if (get(dndIsDragging)) {
return
}
const node = document.getElementsByClassName(id)?.[0]?.children[0]
if (!node) {
return

View File

@ -4,8 +4,6 @@
* @param fn the async function to run
* @return {Promise} a sequential version of the function
*/
import { lastIndexOf } from "lodash/array"
export const sequential = fn => {
let queue = []
return async (...params) => {