misc: avoid some more errors with malformed properties vs match() that expects strings
This commit is contained in:
parent
0cf8d1e42f
commit
b0e9642af7
3 changed files with 7 additions and 6 deletions
|
|
@ -167,12 +167,13 @@ class UiDragResize extends UiWidget {
|
|||
updateRectangle() {
|
||||
|
||||
var widgets = this.widgets,
|
||||
widget = widgets[0]
|
||||
widget = widgets[0],
|
||||
layout = String(widget.parent.getProp('layout'))
|
||||
|
||||
var handlesVisibility = [
|
||||
widget.parent.getProp('layout') === 'default', // nw
|
||||
widget.parent.getProp('layout').match(/horizontal|default/), // e
|
||||
widget.parent.getProp('layout').match(/vertical|default/), // s
|
||||
layout === 'default', // nw
|
||||
layout.match(/horizontal|default/), // e
|
||||
layout.match(/vertical|default/), // s
|
||||
]
|
||||
handlesVisibility.push(handlesVisibility[1] && handlesVisibility[2]) // se
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue