Merge Base.readValue() with Base.read() and rename Base.peekValue() to Base.peek().

When called directly on Base, read() reads values, otherwise the specific type of the subclass it is called on.
This commit is contained in:
Jürg Lehni 2012-12-30 16:07:20 +01:00
parent 1b539301ad
commit 2abefee336
8 changed files with 30 additions and 29 deletions
src/project

View file

@ -226,7 +226,7 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
// We don't need to do this here, but it speeds up things since we won't
// repeatetly convert in Item#hitTest() then.
point = Point.read(arguments);
options = HitResult.getOptions(Base.readValue(arguments));
options = HitResult.getOptions(Base.read(arguments));
// Loop backwards, so layers that get drawn last are tested first
for (var i = this.layers.length - 1; i >= 0; i--) {
var res = this.layers[i].hitTest(point, options);