|
|
|
@ -293,7 +293,7 @@ export default Backbone.View.extend({ |
|
|
|
* */ |
|
|
|
updateAttributes() { |
|
|
|
const attrs = []; |
|
|
|
const { model, $el, el, config } = this; |
|
|
|
const { model, $el, el } = this; |
|
|
|
const { highlightable, textable, type } = model.attributes; |
|
|
|
|
|
|
|
const defaultAttr = { |
|
|
|
@ -311,6 +311,7 @@ export default Backbone.View.extend({ |
|
|
|
// Remove all current attributes
|
|
|
|
each(el.attributes, attr => attrs.push(attr.nodeName)); |
|
|
|
attrs.forEach(attr => $el.removeAttr(attr)); |
|
|
|
this.updateStyle(); |
|
|
|
const attr = { |
|
|
|
...defaultAttr, |
|
|
|
...model.getAttributes() |
|
|
|
@ -320,7 +321,6 @@ export default Backbone.View.extend({ |
|
|
|
keys(attr).forEach(key => attr[key] === false && delete attr[key]); |
|
|
|
|
|
|
|
$el.attr(attr); |
|
|
|
this.updateStyle(); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|