Skip to content

Commit

Permalink
component attrUpdate number fix; camera depth test
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Jun 10, 2015
1 parent 08f46e9 commit b142d4b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## vNEXT

## v1.2.0

* Components [Cc]olor attributes
* Mesh glossiness attribute
* Internal "fvClass" -> "_class"; store classes in FView._classes
* Warn if dev puts more than 1 node inside of famousEach

## v1.1.0

* Fix for Famous 0.5.2 (and further work on DOMElement handling)
Expand Down
1 change: 1 addition & 0 deletions lib/wrappers/Components.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var ComponentClass = FView._classes._Component = {
/*
* Action necessary for object values too
*/
newValue = value;

}

Expand Down
1 change: 1 addition & 0 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Package.onTest(function(api) {
'tests/wrappers/Nodes/Scene.html',
'tests/wrappers/Nodes/Scene.js',
'tests/wrappers/Components.js',
'tests/wrappers/Components/Camera.js',
'tests/wrappers/Components/Mesh.js',
'tests/wrappers/Components/DOMElement.html',
'tests/wrappers/Components/DOMElement.js',
Expand Down
19 changes: 19 additions & 0 deletions tests/wrappers/Components/Camera.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Like Components [cC]olor, but with "; strength"
*/
Tinytest.add('famous-views - Wrappers - Components - Camera - depth', function(test) {
var expectedDepth;

var cdata = {
instance: {
setDepth: function(depth) {
test.equal(typeof depth, "number");
test.equal(depth, expectedDepth);
}
}
};

expectedDepth = 1000;
FView._classes.Camera.attrUpdate('depth', 1000, null, null, null, cdata);
FView._classes.Camera.attrUpdate('depth', "1000", null, null, null, cdata);
});

0 comments on commit b142d4b

Please sign in to comment.