Skip to content

Commit 8e8ffab

Browse files
committed
Add ZImageTurbo calculation info message and regression test
1 parent 0dbd49c commit 8e8ffab

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

js/drawing/resolution_master_draw_methods.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ export const drawingMethods = {
719719
return "💡 HiDream Dev: Uses the closest HiDream Dev preset size.";
720720
} else if (category === "Qwen-Image") {
721721
return "💡 Qwen-Image: Resolution range: ~0.6MP-4.2MP. If input is already in this range, it remains unchanged.";
722+
} else if (category === "ZImageTurbo") {
723+
return "💡 ZImageTurbo Mode: Uses the closest active preset size while preserving orientation. Built-in presets use official resolutions.";
722724
} else if (['Standard', 'Social Media', 'Print', 'Cinema', 'Display Resolutions'].includes(category)) {
723725
return "💡 Calc Mode: Uses the closest preset aspect ratio while keeping the size close to your current resolution.";
724726
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import assert from "node:assert/strict";
2+
import test from "node:test";
3+
4+
import { drawingMethods } from "../../js/drawing/resolution_master_draw_methods.js";
5+
6+
7+
test("ZImageTurbo calculation info describes active preset matching", () => {
8+
const context = {
9+
node: { properties: { selectedCategory: "ZImageTurbo" } }
10+
};
11+
12+
assert.equal(
13+
drawingMethods.getCalcInfoMessage.call(context),
14+
"💡 ZImageTurbo Mode: Uses the closest active preset size while preserving orientation. Built-in presets use official resolutions."
15+
);
16+
});

0 commit comments

Comments
 (0)