Coder Social home page Coder Social logo

Comments (4)

F0rce avatar F0rce commented on June 14, 2024 1

public void setBackgroundColor(int red, int green, int blue, int alpha) {
String rgba = "rgb(" + red + ", " + green + ", " + blue + ", " + alpha + ")";
getElement().setProperty("backgroundColor", rgba);
backgroundColor = rgba;
}

@Koboo as you can see here I forgot to add a "a" after the "rgb". I am currently updating the whole Add-On as there is a whole new version of the frontend code. I already fixed this issue locally and will upload it as soon as I'm done with rebaseing.

Thanks for showing me,
David

from signature-widget.

Koboo avatar Koboo commented on June 14, 2024 1
    public void setBackgroundColor(int r, int g, int b, double alpha) {
      String rgba = "rgb(" + r + ", " + g + ", " + b + ", " + alpha + ")";
      this.getElement().setProperty("backgroundColor", rgba);
    }

If anyone is wondering how to set a background with alpha channel anyway, here is a code snippet that should help. I inherited the SignaturePad in a new class SignatureField and wrote this method there. Until an update is available, this will solve the problem centrally.

And a huge thanks to you @F0rce for supporting the Vaadin open source community! I use several of the components you created/maintained and must say, good job, keep it up!

from signature-widget.

F0rce avatar F0rce commented on June 14, 2024 1

@Koboo thank you very much for the kind words. I do my best to actively maintain / update the components I created.

I fixed the RGBA issue and added some good cleanup to the frontend. The Java Backend didnt change, so everything should work when updating to 2.0.1

Will upload the new version now.

Have a great day and thanks for showing me the issue,
David

from signature-widget.

F0rce avatar F0rce commented on June 14, 2024 1

2.0.1 has been published to the directory

https://vaadin.com/directory/component/signature-widget/2.0.1

from signature-widget.

Related Issues (10)

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.