@@ -9,17 +9,17 @@ distributed under the License is distributed on an "AS IS" BASIS,
9
9
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
*/
11
11
12
- import { SpanielIntersectionObserver , generateEntry } from './intersection-observer' ;
12
+ import { SpanielIntersectionObserver } from './intersection-observer' ;
13
13
14
- import { SpanielTrackedElement , DOMMargin , IntersectionObserverClass } from './interfaces' ;
14
+ import { SpanielTrackedElement , IntersectionObserverClass } from './interfaces' ;
15
15
16
16
export { Watcher , WatcherConfig } from './watcher' ;
17
17
18
18
import { SpanielObserver } from './spaniel-observer' ;
19
19
20
20
import { setGlobalEngine , getGlobalEngine } from './metal/engine' ;
21
21
22
- import { getGlobalScheduler , on , off , scheduleWork , scheduleRead , Frame } from './metal/index' ;
22
+ import { on , off , scheduleWork , scheduleRead } from './metal/index' ;
23
23
24
24
import w from './metal/window-proxy' ;
25
25
@@ -38,19 +38,3 @@ export {
38
38
setGlobalEngine ,
39
39
getGlobalEngine
40
40
} ;
41
-
42
- export function queryElement ( el : Element , callback : ( bcr : ClientRect , frame : Frame ) => void ) {
43
- getGlobalScheduler ( ) . queryElement ( el , callback ) ;
44
- }
45
-
46
- export function elementSatisfiesRatio (
47
- el : HTMLElement ,
48
- ratio : number = 0 ,
49
- callback : ( result : Boolean ) => void ,
50
- rootMargin : DOMMargin = { top : 0 , bottom : 0 , left : 0 , right : 0 }
51
- ) {
52
- queryElement ( el , ( bcr : ClientRect , frame : Frame ) => {
53
- let entry = generateEntry ( frame , bcr , el , rootMargin ) ;
54
- callback ( entry . isIntersecting && entry . intersectionRatio >= ratio ) ;
55
- } ) ;
56
- }
0 commit comments