diff options
| author | ryderr <r@okfoc.us> | 2014-09-29 17:07:25 -0400 |
|---|---|---|
| committer | ryderr <r@okfoc.us> | 2014-09-29 17:07:25 -0400 |
| commit | 275732a4e9310746e82f025ac05670af1107bc63 (patch) | |
| tree | 9752764dd2efa9d38e085fc9c4d43fe79a5809c3 /test | |
| parent | a18a6f0d2fa629fc25004b516c960b794de2ec52 (diff) | |
| parent | adba61c0fa7231372864e742b9775ba0531ad046 (diff) | |
Merge branch 'master' of github.com:okfocus/vvalls
Diffstat (limited to 'test')
| -rw-r--r-- | test/mocks/mx.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mocks/mx.js b/test/mocks/mx.js index 889f4bc..69c4b3a 100644 --- a/test/mocks/mx.js +++ b/test/mocks/mx.js @@ -1,22 +1,33 @@ // Non-DOM-dependent stub MX library // Used for testing code that builds MX elements, without a DOM dependency +var _ = require("lodash"); + var MX = module.exports = {} MX.Object3D = function (klass) { this.klass = klass this.width = this.height = this.scaleX = this.scaleY = this.scaleZ = 1 + this.rotationX = this.rotationY = this.rotationZ = 0 this.z = this.y = this.x = 0 this.side = 0 this.type = "Face" this.el = { style: {} } this.rect = null } +MX.Object3D.prototype.report = function(){ + var data = _.pick(this, ['x','y','z','width','height','rotationX','rotationY']) + return data +} MX.Scene = { els: [], add: function (el) { MX.Scene.els.push(el) + }, + remove: function (el) { + var index = MX.Scene.els.indexOf(el) + MX.Scene.els.splice(index, 1) } } |
