Coder Social home page Coder Social logo

linjc / smooth-signature Goto Github PK

View Code? Open in Web Editor NEW
776.0 9.0 92.0 748 KB

H5带笔锋手写签名,支持PC端和移动端,任何前端框架均可使用

Home Page: https://l2j2c3.gitee.io/smooth-signature/demo

License: MIT License

TypeScript 64.83% HTML 1.86% Vue 29.23% JavaScript 4.08%
canvas signature javascript react-signature vue-signature typescript

smooth-signature's People

Contributors

linjc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smooth-signature's Issues

移动端横屏处理

有没有横屏的处理方案
现状:现将页面布局后,然后整体旋转变成90度,但签名组件坐标计算会反过来,x变成y,y变成x
image

希望开放onMove回调

保存轨迹数据
绘制其他图形
轨迹回放
等都需要onmove回调保存轨迹节点进行实现

等大佬发布一个新版本 ~~

您好,我是纯html,想引入咱们这个怎么写呢

您好,我是采用纯html的方式去使用,这个smoothsignature的js使用<script> 的方式引入,好像不能new SmoothSignature的方式去创建这个canvas ,能帮我一下吗?如何在html上不使用vue去创建呢????

h5端配置问题

按照示例在h5端配置了 但是没有效果 能否看一下demo的源码

isEmpty() 始终返回 false

您好,SmoothSignature 初始化完调用 isEmpty() 就返回 false。

看了下源码,empty()的逻辑是有问题的。

isEmpty = () => {
const canvas = document.createElement('canvas');
canvas.width = this.canvas.width;
canvas.height = this.canvas.height;
if (this.bgColor) {
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D;
ctx.fillStyle = this.bgColor;
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
return canvas.toDataURL() === this.canvas.toDataURL();
}

初始化完调用 isEmpty() 返回true

您好,SmoothSignature 初始化完调用 isEmpty() 就返回true。

这里的逻辑是有问题的。

isEmpty = () => {
const canvas = document.createElement('canvas');
canvas.width = this.canvas.width;
canvas.height = this.canvas.height;
if (this.bgColor) {
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D;
ctx.fillStyle = this.bgColor;
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
return canvas.toDataURL() === this.canvas.toDataURL();
}

是否支持占位文案

请问,支持显示默认文字吗?就是没有写内容的时候会显示“在此签名”这种

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.