A frame with borders tiles unless told to stretch
The fill of a sliced frame defaulted to `Stretch`. It is `Repeat` now, and the Fill dropdown lists `Repeat` first. The saved document keeps writing only the fill that differs from the default, so the key it carries is now `stretch`, and a frame without it repeats. A frame saved before with the key absent and meaning stretch would therefore tile; none of the stored projects has one - both sliced frames on the server carry `fill: "repeat"` explicitly, so they draw as before. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
94a0a578ed
commit
bf0be66c9d
6 files changed
+54
-27
No files matched your search
@@ -75,7 +75,7 @@ describe('serialize', () => {
|
||||
w: 24,
|
||||
h: 24,
|
||||
border: { left: 8, right: 8 },
|
||||
fill: 'repeat',
|
||||
fill: 'stretch',
|
||||
},
|
||||
{ id: 'f2', name: 'Plain', x: 24, y: 0, w: 24, h: 24 },
|
||||
{
|
||||
@@ -96,7 +96,8 @@ describe('serialize', () => {
|
||||
if (texture.type !== 'texture') throw new Error('wrong types');
|
||||
const [sliced, plain, greedy] = texture.frames;
|
||||
expect(sliced?.border).toEqual({ left: 8, top: 0, right: 8, bottom: 0 });
|
||||
expect(sliced?.fill).toBe('repeat');
|
||||
// Only the fill that is not the default is written; an unknown one reads as the default.
|
||||
expect(sliced?.fill).toBe('stretch');
|
||||
expect(plain?.border).toBeUndefined();
|
||||
expect(plain?.fill).toBeUndefined();
|
||||
// Measured against the frame, not the image, and never leaving it without a middle.
|
||||
|
||||
Reference in new issue
Block a user