1
- import { h , render , Component } from 'preact' ;
2
- import { StateSelector } from '../selector/StateSelector' ;
1
+ import { h , Component } from 'preact' ;
3
2
import { toggleClass , addClass } from '../util/toggleClass' ;
4
- import { draggable , dragActions } from '../util/draggable' ;
5
- import { StateTree } from './tree/StateTree' ;
6
- import { Controls } from './Controls' ;
7
- import { DEFAULT_RENDERER , RENDERER_PRESETS } from './renderers' ;
8
- import { Renderer } from './interface' ;
9
3
10
4
export interface IProps {
11
5
minimized ?: boolean ; // ms
@@ -70,7 +64,7 @@ export class StateVisWindow extends Component<IProps, IState> {
70
64
71
65
toggleClass ( 'minimized' ) ( el ) ;
72
66
el . removeEventListener ( 'click' , unminimize ) ;
73
- const animationEndListener = evt => {
67
+ const animationEndListener = ( evt ) => {
74
68
let bounds = el . getBoundingClientRect ( ) ;
75
69
el . style . top = bounds . top + 'px' ;
76
70
el . style . left = bounds . left + 'px' ;
@@ -89,7 +83,7 @@ export class StateVisWindow extends Component<IProps, IState> {
89
83
} ;
90
84
91
85
componentWillUnmount ( ) {
92
- this . deregisterFns . forEach ( fn => fn ( ) ) ;
86
+ this . deregisterFns . forEach ( ( fn ) => fn ( ) ) ;
93
87
}
94
88
95
89
componentDidMount ( ) {
@@ -103,8 +97,8 @@ export class StateVisWindow extends Component<IProps, IState> {
103
97
let _width = this . el . style . width ;
104
98
let _height = this . el . style . height ;
105
99
106
- let observer = new MutationObserver ( mutations => {
107
- mutations . forEach ( mutation => {
100
+ let observer = new MutationObserver ( ( mutations ) => {
101
+ mutations . forEach ( ( mutation ) => {
108
102
if ( mutation . attributeName == 'style' ) {
109
103
let el = mutation . target ,
110
104
newwidth = el [ 'style' ] . width ,
@@ -135,7 +129,7 @@ export class StateVisWindow extends Component<IProps, IState> {
135
129
136
130
render ( ) {
137
131
return (
138
- < div className = "uirStateVisContainer" ref = { el => ( this . el = el as HTMLElement ) } >
132
+ < div className = "uirStateVisContainer" ref = { ( el ) => ( this . el = el as HTMLElement ) } >
139
133
{ this . props . children }
140
134
</ div >
141
135
) ;
0 commit comments