PL-7461 ResizableTextArea should have minimal height equal to $v-unit-size

This commit is contained in:
Nikita Petunin 2016-07-11 18:29:34 +04:00
parent 1f8fe36664
commit 5049caa263
3 changed files with 11 additions and 2 deletions

View File

@ -37,7 +37,6 @@ public class CubaResizableTextAreaWrapperWidget extends VCustomComponent {
protected static final int MOUSE_EVENTS = Event.ONMOUSEDOWN | Event.ONMOUSEMOVE | Event.ONMOUSEUP | Event.ONMOUSEOVER;
protected static final int MINIMAL_WIDTH = 17;
protected static final int MINIMAL_HEIGHT = 17;
public boolean isResizable() {
return resizeElement != null;
@ -132,8 +131,10 @@ public class CubaResizableTextAreaWrapperWidget extends VCustomComponent {
int absoluteLeft = getAbsoluteLeft();
int absoluteTop = getAbsoluteTop();
ComputedStyle cs = new ComputedStyle(getElement().getFirstChildElement());
//do not allow mirror-functionality
if (mouseY > absoluteTop + MINIMAL_HEIGHT && mouseX > absoluteLeft + MINIMAL_WIDTH) {
if (mouseY > absoluteTop + cs.getDoubleProperty("min-height") && mouseX > absoluteLeft + MINIMAL_WIDTH) {
int width = mouseX - absoluteLeft + 2;
int height = mouseY - absoluteTop + 2;

View File

@ -21,6 +21,10 @@
.cuba-resizabletextarea-wrapper {
position: relative;
overflow: hidden;
.v-textarea {
min-height: $v-unit-size;
}
}
.#{$primary-stylename}-resize-corner {

View File

@ -18,6 +18,10 @@
.cuba-resizabletextarea-wrapper {
position: relative;
overflow: hidden;
.v-textarea {
min-height: 15px;
}
}
.#{$primary-stylename}-resize-corner {