Remove overflow:overlay usage

This commit is contained in:
BoykoAlex
2019-01-29 12:07:12 -05:00
parent ffe5cffec1
commit 431e8ff5c3
5 changed files with 16 additions and 6 deletions

View File

@@ -16,6 +16,8 @@ export interface VisibilityState {
children: Array<VisibilityState>;
}
const SCROLLBAR_SIZE = 17;
@Component({
selector: 'flo-editor',
templateUrl: './editor.component.html',
@@ -784,8 +786,8 @@ export class EditorComponent implements OnInit, OnDestroy {
const parentWidth = parent.innerWidth();
const parentHeight = parent.innerHeight();
this.fitToContent(this.gridSize, this.gridSize, this.paperPadding, {
minWidth: parentWidth,
minHeight: parentHeight,
minWidth: parentWidth - SCROLLBAR_SIZE,
minHeight: parentHeight - SCROLLBAR_SIZE,
allowNewOrigin: 'same'
});
}
@@ -802,7 +804,7 @@ export class EditorComponent implements OnInit, OnDestroy {
minScaleY: minScale,
maxScaleX: maxScale,
maxScaleY: maxScale,
fittingBBox: {x: 0, y: 0, width: parentWidth, height: parentHeight}
fittingBBox: {x: 0, y: 0, width: parentWidth - SCROLLBAR_SIZE, height: parentHeight - SCROLLBAR_SIZE}
});
/**
* Size the canvas appropriately and allow origin movement