chore(core): cleanup dimension update
This commit is contained in:
@@ -83,15 +83,15 @@ export default (state: State, getters: ComputedGetters): Actions => {
|
|||||||
|
|
||||||
if (!viewportNode) return
|
if (!viewportNode) return
|
||||||
|
|
||||||
|
const style = window.getComputedStyle(viewportNode)
|
||||||
|
const { m22: zoom } = new window.DOMMatrixReadOnly(style.transform)
|
||||||
|
|
||||||
const changes: NodeDimensionChange[] = updates.reduce<NodeDimensionChange[]>((res, update) => {
|
const changes: NodeDimensionChange[] = updates.reduce<NodeDimensionChange[]>((res, update) => {
|
||||||
const node = getters.getNode.value(update.id)
|
const node = getters.getNode.value(update.id)
|
||||||
|
|
||||||
if (node) {
|
if (node) {
|
||||||
const dimensions = getDimensions(update.nodeElement)
|
const dimensions = getDimensions(update.nodeElement)
|
||||||
|
|
||||||
const style = window.getComputedStyle(viewportNode)
|
|
||||||
const { m22: zoom } = new window.DOMMatrixReadOnly(style.transform)
|
|
||||||
|
|
||||||
const doUpdate =
|
const doUpdate =
|
||||||
!!(
|
!!(
|
||||||
dimensions.width &&
|
dimensions.width &&
|
||||||
|
|||||||
Reference in New Issue
Block a user