inputEx Documentation Back to homepage

### inputEx Documentation > VectorField.js 0.2.2

This is the source view for VectorField.js

(function() { var inputEx = YAHOO.inputEx; /** * @class A field limited to number inputs (floating) * @extends inputEx.Field * @constructor * @param {Object} options inputEx.Field options object */ inputEx.VectorField = function(options) { inputEx.VectorField.superclass.constructor.call(this,options); }; YAHOO.lang.extend(inputEx.VectorField, inputEx.CombineField, /** * @scope inputEx.VectorField.prototype */ { /** * Additional options for VectorField (dimension, size) */ setOptions: function(options) { inputEx.VectorField.superclass.setOptions.call(this, options); this.options.dimension = options.dimension || 2; this.options.size = options.size || 3; this.options.fields = []; for(var i = 0 ; i < this.options.dimension ; i++) { this.options.fields.push({type: 'number', inputParams: {size: this.options.size} }); } } }); /** * Register this class as "2Dvector" type */ inputEx.registerType("vector", inputEx.VectorField); })();

Copyright (c) 2007-2009 Eric Abouaf. All rights reserved.
Generated by JsDoc Toolkit 2.0.0 on Wed, 04 Mar 2009 15:41:30 GMT using neyricjslibs-template.