google / blockly-samples

Plugins, codelabs, and examples related to the Blockly library.

Home Page:http://github.com/google/blockly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bitmap Field doesn't update pixel size with fixed field height and new value

mikeharv opened this issue · comments

Check for duplicates

  • I have searched for similar issues before opening a new one.

Component

field-bitmap

Description

The bitmap field's image dimensions are updated with any new value, but the pixel size is not updated. This is a problem if a static field height is specified. If the field value is updated to an array of a different length, the unchanging pixel size means that the rendered height of the field will also change.

Reproduction steps

  1. Obtain the serialization for a block with an initial value.
  2. Modify the serialized field value, being sure to change the array length.
  3. Add a block to the workspace using the new value

You would expect the new block to have the same field height (with larger/smaller pixels), but the actual result is a block with a field of a different height.

Stack trace

No response

Screenshots

image