
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
sketch-lite
Advanced tools
Just a HTML5 sketch-pad based on canvas. 简易 H5 画板,支持绘画与擦除
# Use npm
$ npm install sketch-lite --save
# Use Yarn
$ yarn add sketch-lite
var SketchLite = require('sketch-lite');
// @Class Sketch
// @param String|HTMLCanvasElement id canvas节点id或者该对象
// @param Object config 初始画板配置
// .width int 画板宽度
// .height int 画板高度
// .lineWidth int 笔画宽度
// .color 笔画颜色
// .bgcolor 背景颜色
// .multi 是否支持多指同时绘画
var sketch=new SketchLite('canvas',{
width:document.body.clientWidth,
height:document.body.clientHeight,
bgcolor:'transparent'
lineWidth:5,
color:'red',
multi:false
});
// @event
// start 开始绘画
// move 绘画中
// end 绘画结束
sketch.on('start',function(){
console.log('开始绘画');
});
sketch.on('move',function(){
console.log('绘画中');
});
sketch.on('end',function(){
console.log('绘画结束');
});
// @method
sketch.clear(); //清除画布重新开始
sketch.cancel(num); //上一步,num为取消步数,默认为1
sketch.toDataUrl(type); //转为dataUrl数据
sketch.toBlob(callback,type); //生成blob对象(不支持ie9-)
// 更改笔画宽度、颜色
sketch.lineWidth=10;
sketch.color='green';
// erase擦除
sketch.erase=true; //该属性为true时表示是擦除状态
FAQs
Just a HTML5 sketch-pad.
We found that sketch-lite 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.