mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
fix: Don't warn if field is acually 0 width (#6558)
One part of issue 6557.
This commit is contained in:
@@ -797,10 +797,13 @@ export abstract class Field implements IASTNodeLocationSvg,
|
|||||||
} else if (this.visible_ && this.size_.width === 0) {
|
} else if (this.visible_ && this.size_.width === 0) {
|
||||||
// If the field is not visible the width will be 0 as well, one of the
|
// If the field is not visible the width will be 0 as well, one of the
|
||||||
// problems with the old system.
|
// problems with the old system.
|
||||||
console.warn(
|
|
||||||
'Deprecated use of setting size_.width to 0 to rerender a' +
|
|
||||||
' field. Set field.isDirty_ to true instead.');
|
|
||||||
this.render_();
|
this.render_();
|
||||||
|
// Don't issue a warning if the field is actually zero width.
|
||||||
|
if (this.size_.width !== 0) {
|
||||||
|
console.warn(
|
||||||
|
'Deprecated use of setting size_.width to 0 to rerender a' +
|
||||||
|
' field. Set field.isDirty_ to true instead.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return this.size_;
|
return this.size_;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ function tokenizeInterpolationInternal(
|
|||||||
message: string, parseInterpolationTokens: boolean): (string|number)[] {
|
message: string, parseInterpolationTokens: boolean): (string|number)[] {
|
||||||
const tokens = [];
|
const tokens = [];
|
||||||
const chars = message.split('');
|
const chars = message.split('');
|
||||||
chars.push( // End marker.
|
chars.push(''); // End marker.
|
||||||
'');
|
|
||||||
// Parse the message with a finite state machine.
|
// Parse the message with a finite state machine.
|
||||||
// 0 - Base case.
|
// 0 - Base case.
|
||||||
// 1 - % found.
|
// 1 - % found.
|
||||||
|
|||||||
Reference in New Issue
Block a user