
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
js-ui-engine
Advanced tools
This was just a simple Javascript library I put together for myself to help make the HTML5 Canvas use objects so that it can be somewhat event driven.
Feel free to use this library and if you find any bugs please let me know and I will fix them.
Creation Date: 21/09/2014
URL: https://github.com/Slyke/Javascript-UI-Engine
NPM: npm install js-ui-engine
Version: 2.20250522.1
This is a simple canvas control class for Javascript. This class can be used as an instantiated object or as a singleton.
const canvasControl = new CanvasControl(); // Create the class
const c = document.getElementById("canvasDraw"); // Get the canvas DOM element
canvasControl.setupCanvas({ canvas: c }); // Setup the canvas
// Add event listeners
c.addEventListener('click', e => {
canvasControl.mouseEventHandler({ e, type: "Click" });
});
c.addEventListener('mousemove', e => {
canvasControl.mouseEventHandler({ e, type: "Move" });
});
// Create the new object
const newSquare = {
x: 50,
y: 50,
w: 250,
h: 250,
shape: "rect",
render(self) {
canvasControl.drawRect({
key: self.key,
x: self.x,
y: self.y,
w: self.w,
h: self.h
});
},
clickEvent(x, y, self) {
console.log(x, y, self, "click");
},
moveEvent(x, y, self) {
console.log(x, y, self, "move");
},
visible: true
};
// Add to canvasObjects map
canvasControl.addCanvasObject({ object: newSquare });
// Redraw screen
canvasControl.refreshScreen();
Checkout the examples folder for more.
The MIT License (MIT)
Copyright (c) 2014 Steven Lawler (Slyke)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
FAQs
Javascript UI Engine
We found that js-ui-engine demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.