Lint and prevent scrolling to selected component when starting dragging
This commit is contained in:
parent
adc7e8e5fc
commit
d166cbb466
|
@ -1,6 +1,6 @@
|
||||||
import { get, writable } from "svelte/store"
|
import { get, writable } from "svelte/store"
|
||||||
import { cloneDeep } from "lodash/fp"
|
import { cloneDeep } from "lodash/fp"
|
||||||
import { selectedScreen, selectedComponent, store } from "builderStore"
|
import { selectedScreen, selectedComponent } from "builderStore"
|
||||||
import {
|
import {
|
||||||
datasources,
|
datasources,
|
||||||
integrations,
|
integrations,
|
||||||
|
|
|
@ -421,7 +421,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const scrollIntoView = () => {
|
const scrollIntoView = () => {
|
||||||
|
// Don't scroll into view if we selected this component because we were
|
||||||
|
// starting dragging on it
|
||||||
|
if (get(dndIsDragging)) {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
const node = document.getElementsByClassName(id)?.[0]?.children[0]
|
const node = document.getElementsByClassName(id)?.[0]?.children[0]
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return
|
return
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
* @param fn the async function to run
|
* @param fn the async function to run
|
||||||
* @return {Promise} a sequential version of the function
|
* @return {Promise} a sequential version of the function
|
||||||
*/
|
*/
|
||||||
import { lastIndexOf } from "lodash/array"
|
|
||||||
|
|
||||||
export const sequential = fn => {
|
export const sequential = fn => {
|
||||||
let queue = []
|
let queue = []
|
||||||
return async (...params) => {
|
return async (...params) => {
|
||||||
|
|
Loading…
Reference in New Issue