Code Monkey home page Code Monkey logo

Comments (4)

brinley avatar brinley commented on August 16, 2024

You can display base30 in the jSignature instance. If you want to display in an img, you will need to convert it. There are sample code in the repo examples folder. Alternatively use getData to export in a format that can be displayed in the img tag

from jsignature.

czl0325 avatar czl0325 commented on August 16, 2024

不是,我在有两个div。第一个div用于签名,并在这个div上签名获取base30图像

$("#signature1").jSignature({color: "#000", width: '300', height: '600', "background-color": "#fff"});
const data = $("#signature1").jSignature('getData', 'base30')

在第二个div显示,div定义如下

$("#signature2").jSignature({color: "#000", width: '30', height: '60', "background-color": "#fff"});
$('#signature2').jSignature('setData', "data:"+ data.join(','))

但是因为#signature2的尺寸是signature1的1/10,无法显示出signature1的图像,你并没有等比缩放10倍填充在signature2内!

from jsignature.

czl0325 avatar czl0325 commented on August 16, 2024

另外js通过base30转base64可有示例代码?在demo中没有找到。应该怎么调用?能否写个示例

from jsignature.

czl0325 avatar czl0325 commented on August 16, 2024

@brinley

from jsignature.

Related Issues (20)

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.