Skip to content

u1ui/PointerObserver.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

PointerObserver.js

Observe mouse and touches

Ussage

import {PointerObserver} from "../PointerObserver.js";
new PointerObserver(el).onmove = function(e){
    console.log(this.pos);
}
<div id=el style="position:absolute;">
    StartObserving
</div>

doc

Install

import * as module from "https://cdn.jsdelivr.net/gh/u1ui/[email protected]/PointerObserver.min.js"

Demos

minimal.html
test.html

About

  • MIT License, Copyright (c) 2022 (like all repositories in this organization)
  • Suggestions, ideas, finding bugs and making pull requests make us very happy. ♥