Skip to content

Commit

Permalink
Merge pull request #296 from entrylabs/issue/dropdown_width_force
Browse files Browse the repository at this point in the history
force dropdown width
  • Loading branch information
chanlee committed May 25, 2016
2 parents 6c35c2c + b697daa commit b334ff3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion dist/entry.css
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,12 @@ svg .svgBlockGroup text {
color: #000;
z-index: 1001;
overflow: auto;
left: 0;
top: 0;
}
.entry-widget-dropdown .rect {
height: 20px;
padding: 3px 19px 3px 6px;
padding: 3px 17px 3px 6px;
width: 100%;
}
.entry-widget-dropdown .rect .left {
Expand Down
2 changes: 1 addition & 1 deletion dist/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16855,7 +16855,7 @@ Entry.Utils.inherit(Entry.Field, Entry.FieldDropdown);
} else {
a.x += this.box.width / 2 - this.optionGroup.width() / 2;
}
this.optionGroup.css({left:a.x, top:a.y});
this.optionGroup.css({left:a.x, top:a.y, width:this.optionGroup.width() + 3});
};
b.applyValue = function(a) {
this.value != a && this.setValue(a);
Expand Down
4 changes: 2 additions & 2 deletions dist/entry.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/css/components/block.less
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,12 @@ svg .svgBlockGroup text {
color: #000;
z-index: 1001;
overflow: auto;
left: 0;
top: 0;

.rect {
height: 20px;
padding: 3px 19px 3px 6px;
padding: 3px 17px 3px 6px;
width: 100%;

.left {
Expand Down
6 changes: 4 additions & 2 deletions src/workspace/field/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ Entry.Utils.inherit(Entry.Field, Entry.FieldDropdown);
});
})(element, value);
}

this._position();
};

Expand Down Expand Up @@ -211,7 +210,10 @@ Entry.Utils.inherit(Entry.Field, Entry.FieldDropdown);
pos.y -= this.optionGroup.height();
} else pos.x += this.box.width/2 - this.optionGroup.width()/2;

this.optionGroup.css({left: pos.x, top: pos.y});
this.optionGroup.css({
left: pos.x, top: pos.y,
width: this.optionGroup.width() + 3
});
};

p.applyValue = function(value) {
Expand Down
1 change: 0 additions & 1 deletion src/workspace/field/dropdownDynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ Entry.Utils.inherit(Entry.FieldDropdown, Entry.FieldDropdownDynamic);
});
})(element, value);
}

this._position();
};

Expand Down

0 comments on commit b334ff3

Please sign in to comment.