-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: improve fallback behavior for custom input labels #9942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
56679aa
4e274f2
9b37c1d
01ace79
8fe097d
63a6084
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -458,7 +458,7 @@ FactoryUtils.getFieldsJs_ = function(block) { | |
| } | ||
| break; | ||
| case 'field_image': | ||
| // Result: new Blockly.FieldImage('http://...', 80, 60, '*') | ||
| // Result: new Blockly.FieldImage('http://...', 80, 60, {alt: '*', flipRtl: false}) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this also be fixed to use the correct format moving forward? No worries if you're planning to do that in another PR or just file a bug for it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the legacy block factory which we'll delete soon so not going to fix it here but can file a bug to fix it in samples |
||
| var src = JSON.stringify(block.getFieldValue('SRC')); | ||
| var width = Number(block.getFieldValue('WIDTH')); | ||
| var height = Number(block.getFieldValue('HEIGHT')); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably invert these two checks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that seems fine too, but just curious why?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normally
valueis going to be a string, so having this check first will fail the fastest (desired behavior for the common case) though i'm not sure it really matters either way