Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
verticalAlign: 'top',
childLayout: 'stackLayout',
horizontal: true,
startSize: 26,
horizontalStack: 0,
resizeParent: true,
resizeParentMax: 0,
resizeLast: 0,
collapsible: 1,
marginBottom: 0,
},
}
const cell = new Cell(
'Classname',
new Geometry(0, 0, data.width, data.height),
data.style,
)
cell.asNode(true)
// cell.insertChild(field.clone())
// cell.insertChild(divider.clone())
return {
data,
render: getRendererForCells([cell]),
}
})
updateSize(w: number, h: number) {
const geom = new Geometry(this.state.x, this.state.y, w, h)
this.executeCommand('updateGeometry', geom)
this.setState({ w, h })
}
onLeftChanged = (x: number) => {
if (x != null) {
this.setState({ x })
this.executeCommand(
'updateGeometry',
new Geometry(x, this.state.y, this.state.w, this.state.h),
)
}
}
onTopChanged = (y: number) => {
if (y != null) {
this.setState({ y })
this.executeCommand(
'updateGeometry',
new Geometry(this.state.x, y, this.state.w, this.state.h),
)
}
}