Fixing model view editor to layout currenty with native and custom settings (#5650)

This commit is contained in:
udeeshagautam
2019-05-25 16:33:25 -07:00
committed by GitHub
parent 3bc82c10b1
commit 4c68580e82

View File

@@ -85,7 +85,7 @@ export class ModelViewEditor extends BaseEditor {
const containerRect = modelViewContainer.parentElement.getBoundingClientRect();
modelViewContainer.style.position = 'absolute';
modelViewContainer.style.top = `${frameRect.top}px`;
modelViewContainer.style.top = `${frameRect.top - containerRect.top}px`;
modelViewContainer.style.left = `${frameRect.left - containerRect.left}px`;
modelViewContainer.style.width = `${frameRect.width}px`;
modelViewContainer.style.height = `${frameRect.height}px`;