mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Add support for Component#suffix, to define a linked label that should appear after the input element.
This commit is contained in:
parent
c2cb3e3342
commit
214ac10d57
1 changed files with 12 additions and 0 deletions
|
@ -146,6 +146,18 @@ var Component = Base.extend(Callback, /** @lends Component# */{
|
|||
'text', label + ':');
|
||||
},
|
||||
|
||||
getSuffix: function() {
|
||||
return this._suffix;
|
||||
},
|
||||
|
||||
setSuffix: function(suffix) {
|
||||
this._suffix = suffix;
|
||||
DomElement.set(this._suffixNode = this._suffixNode
|
||||
|| this._input.parentNode.appendChild(DomElement.create('label',
|
||||
{ 'for': 'palettejs-input-' + this._name })),
|
||||
'text', suffix);
|
||||
},
|
||||
|
||||
getOptions: function() {
|
||||
return this._options;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue