@@ -145,11 +145,10 @@ <h1 class="page-title">Source: component.js</h1>
145145
146146 // outer handle
147147 if ( config.$node !== undefined ) {
148-
149148 if ( DEBUG ) {
150149 if ( !(config.$node instanceof Element) ) { throw 'wrong config.$node type'; }
151150 }
152-
151+ // apply
153152 this.$node = config.$node;
154153 } else {
155154 // empty div in case nothing is given
@@ -161,7 +160,7 @@ <h1 class="page-title">Source: component.js</h1>
161160 if ( DEBUG ) {
162161 if ( !(config.$body instanceof Element) ) { throw 'wrong config.$body type'; }
163162 }
164-
163+ // apply
165164 this.$body = config.$body;
166165 } else {
167166 // inner and outer handlers are identical
@@ -173,7 +172,7 @@ <h1 class="page-title">Source: component.js</h1>
173172 if ( DEBUG ) {
174173 if ( !(config.$content instanceof Element) ) { throw 'wrong config.$content type'; }
175174 }
176-
175+ // apply
177176 this.$body.appendChild(config.$content);
178177 }
179178
@@ -185,7 +184,7 @@ <h1 class="page-title">Source: component.js</h1>
185184 if ( DEBUG ) {
186185 if ( !(config.parent instanceof Component) ) { throw 'wrong config.parent type'; }
187186 }
188-
187+ // apply
189188 config.parent.add(this);
190189 }
191190
@@ -194,7 +193,7 @@ <h1 class="page-title">Source: component.js</h1>
194193 // if ( DEBUG ) {
195194 // if ( !(config.page instanceof Component) ) { throw 'wrong config.page type'; }
196195 // }
197- //
196+ // // apply
198197 // this.page = config.page;
199198 //}
200199
@@ -223,7 +222,7 @@ <h1 class="page-title">Source: component.js</h1>
223222 if ( DEBUG ) {
224223 if ( !Array.isArray(config.children) ) { throw 'wrong config.children type'; }
225224 }
226-
225+ // apply
227226 this.add.apply(this, config.children);
228227 }
229228
@@ -272,6 +271,10 @@ <h1 class="page-title">Source: component.js</h1>
272271 this.$node.title = 'component ' + this.constructor.name + '.' + this.id + ' (outer)';
273272 this.$body.title = 'component ' + this.constructor.name + '.' + this.id + ' (inner)';
274273 }
274+
275+ // @todo remove or implement
276+ // navigation by keyboard
277+ //this.addListener('keydown', this.navigateDefault);
275278}
276279
277280
@@ -280,6 +283,37 @@ <h1 class="page-title">Source: component.js</h1>
280283Component.prototype.constructor = Component;
281284
282285
286+ /**
287+ * Default method to move focus according to pressed keys.
288+ *
289+ * @todo remove or implement
290+ *
291+ * @param {Event} event generated event source of movement
292+ */
293+ /*Component.prototype.navigateDefault = function ( event ) {
294+ switch ( event.code ) {
295+ case keys.up:
296+ case keys.down:
297+ case keys.right:
298+ case keys.left:
299+ // notify listeners
300+ this.emit('overflow');
301+ break;
302+ }
303+ };*/
304+
305+
306+ /**
307+ * Current active method to move focus according to pressed keys.
308+ * Can be redefined to provide custom navigation.
309+ *
310+ * @todo remove or implement
311+ *
312+ * @type {function}
313+ */
314+ /*Component.prototype.navigate = Component.prototype.navigateDefault;*/
315+
316+
283317/**
284318 * Add a new component as a child.
285319 *
@@ -565,7 +599,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-st
565599< br class ="clear ">
566600
567601< footer >
568- Documentation generated by < a href ="https://github.com/jsdoc3/jsdoc "> JSDoc 3.3.0-beta1</ a > on Tue Feb 03 2015 14:02:46 GMT+0200 (EET)
602+ Documentation generated by < a href ="https://github.com/jsdoc3/jsdoc "> JSDoc 3.3.0-beta1</ a > on Wed Feb 18 2015 17:53:43 GMT+0200 (EET)
569603</ footer >
570604
571605< script > prettyPrint ( ) ; </ script >
0 commit comments