
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
h5-image-editor
Advanced tools
基于 canvas 的图片编辑. online demo
npm install h5-image-editor
# or
yarn add h5-image-editor
# development
npm run start
# build
npm run build
<div style="width:300px;height:300px" id="container"></div>;
var container = document.getElementById("container");
new Editor.default({
root: container, // root dom container
color: "#000", // draw color
lineWidth: 8, // draw line width
openSmooth: false, // if enable brush thickness effect
center: true, // if entered canvas in container
rotate: 0, // export rotated image, available values: -90/90/-180/180
minWidth: 2, // minimize linWidth
minSpeed: 1.5, // minimize brush move speed
scaleRatio: window.devicePixelRatio, // canvas scale ratio
resizeRatio: 1 / window.devicePixelRatio, // resize canvas ratio
scaleable: true, // canvas can pinch scaleable
maxScale: 5, // max scacle by pinch
maxWidth: window.innerWidth, // canvas element style max width
maxWidthDiffRate: 20, // Smooth transition threshold
maxHistoryLength: 0, // max history length, no limit if set to 0
undoRedoStateChange: Function, // state change callback if undo/redo state changed
onDrawStart: Function, // called when draw starts, [MouseEvent, point]
onDrawing: Function, // called when draw going , [MouseEvent, point]
onDrawUp: Function, // called when draw up , [MouseEvent, Image]
});
parameters: width [number]
set draw lineWidth dynamic
parameters: color [string]
set draw color dynamic
parameters: options Object
set override options, all properties same as constructor parameters, see above
clear the canvas
go prev draw stage
go next draw stage
query if can undo
query if can redo
parameters: [rotate] boolean
reset translate、scale and origin
parameters: scale number
set scale manually
get the cropped or origin canvas dom
destroy the instance
FAQs
h5 image editor
We found that h5-image-editor demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.