Responsive resizing of canvas

Created on 7 April 2023, over 1 year ago
Updated 11 April 2023, over 1 year ago

Problem/Motivation

Canvas size is hard-coded in pixels, so it can't work at the same time on bigger and smaller screens

Steps to reproduce

Open a page on mobile device, or use device simulation mode - field doesn't fit the screen

Proposed resolution

Use the solution suggested in https://github.com/szimek/signature_pad/issues/268 and set the canvas size in signature.js

This also would make configuration parameters width and height optional

Remaining tasks

Right the patch

User interface changes

Signature field displayed correctly on both small and big screens

API changes

Configuration parameters width and height become optional

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇬Bulgaria valthebald Sofia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @valthebald
  • 🇧🇪Belgium matthijs

    Giving the canvas a width of 100% would result in signature images of various widths (since the image is as wide as the canvas).
    This may give some unwanted side effects, so I'd propose to allow an admin to specify the width in % and thus explicitly enable this behavior. I'd keep the height as a required and fixed value, not sure why you suggest it would become optional?

Production build 0.71.5 2024