Преглед изворни кода

Change the implementation of Frame.results

customisations
alemart пре 11 месеци
родитељ
комит
675c8244a3
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4
    3
      src/core/frame.ts

+ 4
- 3
src/core/frame.ts Прегледај датотеку

@@ -58,7 +58,7 @@ export class Frame
58 58
     private readonly _session: Session;
59 59
 
60 60
     /** Results of all trackers (in the current frame) */
61
-    private readonly _results: IterableTrackerResults;
61
+    private readonly _results: TrackerResult[];
62 62
 
63 63
 
64 64
 
@@ -70,7 +70,7 @@ export class Frame
70 70
     constructor(session: Session, results: TrackerResult[])
71 71
     {
72 72
         this._session = session;
73
-        this._results = new IterableTrackerResults(results);
73
+        this._results = results;
74 74
     }
75 75
 
76 76
     /**
@@ -86,6 +86,7 @@ export class Frame
86 86
      */
87 87
     get results(): Iterable<TrackerResult>
88 88
     {
89
-        return this._results;
89
+        // we want to be able to iterate over the results of a frame multiple times
90
+        return new IterableTrackerResults(this._results);
90 91
     }
91 92
 }

Loading…
Откажи
Сачувај