Add a decimals option, fix dropdown overflow and the texture filter
- NumberField takes a decimals option (default 3); frame rects and the slice dialog use 0, matching their integer model. - Button truncates its label to the drawn width; Dropdown reserves the chevron slot. NodeView reuses the shared truncate(). - Setting scaleMode leaves the style's shared resource id in place, so the old GPU sampler stayed in use until a reload. Call style.update(). - Graph gets a header bar like the Texture tab: GraphEditor is now the frame, the former editor is GraphCanvas. A selection the tab does not concern no longer unloads the behavior. - New e2e step 14 guards text overflow across all widgets. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
35a1a23af8
commit
f16801aef3
22 files changed
+874
-493
No files matched your search
+10
-1
@@ -22,7 +22,7 @@ describe('centreY', () => {
|
||||
});
|
||||
|
||||
describe('formatNumber', () => {
|
||||
it('always shows three decimals', () => {
|
||||
it('shows three decimals by default', () => {
|
||||
expect(NUMBER_DECIMALS).toBe(3);
|
||||
expect(formatNumber(100)).toBe('100.000');
|
||||
expect(formatNumber(0.5)).toBe('0.500');
|
||||
@@ -50,6 +50,15 @@ describe('formatNumber', () => {
|
||||
expect(formatNumber(1.25, 1)).toBe('1.3');
|
||||
expect(formatNumber(1.25, 0)).toBe('1');
|
||||
});
|
||||
|
||||
it('shows a field of integral values without a decimal point at all', () => {
|
||||
// What `NumberFieldOptions.decimals: 0` buys: a pixel index or a count of tiles reads
|
||||
// "33" and "4" instead of "33.000" and "4.000".
|
||||
expect(formatNumber(33, 0)).toBe('33');
|
||||
expect(formatNumber(-4, 0)).toBe('-4');
|
||||
// The minus-zero rule holds at every precision, not just the default one.
|
||||
expect(formatNumber(-0.4, 0)).toBe('0');
|
||||
});
|
||||
});
|
||||
|
||||
describe('snapToStep', () => {
|
||||
|
||||
Reference in new issue
Block a user