Skip to content

Commit 75f7ebb

Browse files
author
Jared Deckard
committed
Reused Pointable prototype
1 parent fee1d0f commit 75f7ebb

File tree

3 files changed

+5
-37
lines changed

3 files changed

+5
-37
lines changed

Leap.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,36 +1197,20 @@ Leap.PointableList.prototype._delete = function(){
11971197

11981198
Leap.FingerList = function(){};
11991199

1200-
Leap.FingerList.prototype = new Array;
1200+
Leap.FingerList.prototype = Leap.PointableList.prototype;
12011201

12021202
Leap.FingerList.prototype.append = function(other){
12031203
for(i = 0; i < other.length; i++) this.push(new Leap.Finger(other[i]));
12041204
};
12051205

1206-
Leap.FingerList.prototype.count = function(){
1207-
return this.length;
1208-
};
1209-
1210-
Leap.FingerList.prototype.empty = function(){
1211-
return this.length > 0;
1212-
};
1213-
12141206
Leap.ToolList = function(){};
12151207

1216-
Leap.ToolList.prototype = new Array;
1208+
Leap.ToolList.prototype = Leap.PointableList.prototype;
12171209

12181210
Leap.ToolList.prototype.append = function(other){
12191211
for(i=0; i<other.length; i++) this.push(new Leap.Tool(other[i]));
12201212
};
12211213

1222-
Leap.ToolList.prototype.count = function(){
1223-
return this.length;
1224-
};
1225-
1226-
Leap.ToolList.prototype.empty = function(){
1227-
return this.length>0;
1228-
};
1229-
12301214
Leap.Screen = function(data){
12311215

12321216
if(data){

0 commit comments

Comments
 (0)