Skip to content

Commit 4092577

Browse files
HTMLinfo index signatures, HTMLattr set snapback bug fix
1 parent 73d6d1c commit 4092577

File tree

4 files changed

+150
-200
lines changed

4 files changed

+150
-200
lines changed

src/components/KonvaStage.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class KonvaStage extends Component {
1212
constructor(props) {
1313
super(props);
1414
this.state = {
15-
stageWidth: 1500,
15+
stageWidth: 1800,
1616
stageHeight: 1500,
1717
blockSnapSize: 10,
1818
grid: [],
@@ -49,13 +49,13 @@ class KonvaStage extends Component {
4949
// here we should add listener for "container" resize
5050
// take a look here https://developers.google.com/web/updates/2016/10/resizeobserver
5151
// for simplicity I will just listen window resize
52-
// window.addEventListener('resize', this.checkSize);
52+
window.addEventListener('resize', this.checkSize);
5353
this.container.addEventListener('keydown', this.handleKeyDown);
5454
this.createGrid();
5555
}
5656

5757
componentWillUnmount() {
58-
// window.removeEventListener('resize', this.checkSize);
58+
window.removeEventListener('resize', this.checkSize);
5959
this.container.removeEventListener('keydown', this.handleKeyDown);
6060
}
6161

src/utils/Interfaces.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface ChildInt {
2222
position: PositionInt;
2323
color: string | null; // maybe optional instead, look up null vs undefined
2424
htmlElement: string | null; // maybe should be optional instead
25-
HTMLInfo: object; // replace with HTMLinfo specifics
25+
HTMLInfo: { [index: string]: { info: any } }; // replace with HTMLinfo specifics
2626
}
2727

2828
export interface ChildrenInt extends Array<ChildInt> {}
@@ -48,8 +48,8 @@ export interface ApplicationStateInt {
4848
successOpen: boolean;
4949
errorOpen: boolean;
5050
focusComponent: ComponentInt;
51-
selectableChildren: Array<number>;
52-
ancestors: Array<number>;
51+
selectableChildren: number[];
52+
ancestors: number[];
5353
initialApplicationFocusChild: ChildInt;
5454
focusChild: ChildInt;
5555
components: ComponentsInt;

0 commit comments

Comments
 (0)