+ onNodeTextChange: function(event) {
+ var node = event.meta.node;
+
+ /* TODO: This handling of changes to the comments should probably be implemented via separate,
+ non-rendering comments element */
+ if(node.parent() && node.parent().is('comment') && this.wlxmlNode.sameNode(node.parent().parent())) {
+ this.commentsView.render();
+ }
+ },
+
+ onStateChange: function(changes) {
+ if(_.isBoolean(changes.exposed) && !this.isSpan()) {
+ this._container().toggleClass('highlighted-element', changes.exposed);
+ }
+ if(_.isBoolean(changes.active) && !this.isSpan()) {
+ this._container().toggleClass('current-node-element', changes.active);
+ }
+ },
+
+ ///
+
+ isSpan: function() {
+ return this.wlxmlNode.getTagName() === 'span';
+ },
+