UNPKG

photoncss

Version:

Go from 0 to app in seconds

24 lines 730 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const jquery_1 = __importDefault(require("jquery")); let x = 0; let y = 0; let isMouseDown = false; (0, jquery_1.default)("body").on("mousemove", function (event) { x = event.pageX; y = event.pageY; }); (0, jquery_1.default)("body").on("mousedown", function () { isMouseDown = true; }); (0, jquery_1.default)("body").on("mouseup", function () { isMouseDown = false; }); function getPointer() { return { x, y, isMouseDown }; } exports.default = getPointer; //# sourceMappingURL=getPointer.js.map