Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5177

signature saves a background image into a larger one

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.6.3
    • 9.6.2
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. run the zul and put the page on a screen with devicePixelRatio != 1
      If you don't have such a screen, you can set the browser zoom level to 125% to simulate this case
      2. save the signature with the background image

      Current Result

      the saved image size is larger and the saved image is an enlarged result of the original image

      Expected Result

      the saved image size equal to the specified size of the signature

      Debug Information

      • check canvas element with the developer tool, the size of canvas elements is 125% of the outer div ( 600 * 125% - border = 747)
      • onSize(), it renders canvas width and height by multiplying on devicePixelRatio.
      • in the user environment, all their screen setting have 125% zoom by default at the OS level and cannot change it.
      • if there is a use case to multiply devicePixelRatio, we should make this behavior configurable.

      Workaround

      zk-5177.js

        1. canvasSize.jpg
          canvasSize.jpg
          25 kB
        2. settings.png
          settings.png
          401 kB
        3. SignatureComposer.java
          0.5 kB
        4. zk-5177.js
          2 kB
        5. zk-5177.zul
          0.3 kB

            jumperchen jumperchen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: