| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| OpenPublisher-5-x86_64.AppImage | 2026-10-07 | 166.4 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-10-07 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-10-07 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-10-07 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-10-07 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-10-07 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-10-07 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-10-07 | 156.2 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-10-07 | 185.5 MB | |
| 5.5.0_ Rotation-Aware Object _ Image Resizing Engine source code.tar.gz | 2026-10-07 | 22.5 MB | |
| 5.5.0_ Rotation-Aware Object _ Image Resizing Engine source code.zip | 2026-10-07 | 22.7 MB | |
| README.md | 2026-10-07 | 18.0 kB | |
| Totals: 12 Items | 1.7 GB | 0 | |
🚀 Summary
Version 5.5.0 of Open Publisher introduces a complete mathematical rewrite of object and image resizing, delivering the Rotation-Aware Affine Transform Resizing Engine. This resolves a long-standing issue where rotated or upside-down elements (including images, text boxes, shapes, WordArt, smart arrows, and tables) resized unintuitively when manipulated using canvas selection handles. When an object was rotated 180 degrees (upside down), grabbing the handle physically positioned at the bottom-left previously caused the object to shrink and displaced the opposite corner rather than following the cursor.
With v5.5.0, resizing operations extract the 2D affine basis vectors (u, v) directly from the element's transformation matrix. Cursor displacements on the screen are projected into the element's local coordinate frame, allowing dimensions to expand or contract along local axes while shifting the element's center in paper coordinates. This ensures that the grabbed handle tracks the user's cursor at 1:1 precision, while the opposite handle remains pinned at (0, 0) displacement in world coordinates, regardless of whether the element is at 0°, 45°, 90°, 180°, 270°, or any arbitrary angle.
In addition, the selection overlay handles dynamically update their CSS cursor styling (ns-resize, nesw-resize, ew-resize, nwse-resize) to reflect their visual orientation on screen when rotated. All existing capabilities (aspect ratio locking, center resize with Ctrl/Cmd, table physical bounds clamping, inner image proportional scaling, crop mode, and undo/redo history) remain intact.
Key highlights of v5.5.0 include:
- Intuitive Rotated Resizing: Resizing an upside-down (180°) or rotated element tracks the grabbed handle directly under the cursor, keeping the opposite anchor stationary.
- 2D Affine Basis Extraction (
getElementTransformBasis): Extracts orthonormal basis unit vectorsu(width axis) andv(height axis) from 2D/3D CSS transforms (matrix(),matrix3d(),rotate(),scale()). - Screen Delta Projection: Converts screen deltas
(dx, dy)into element local axes via dot products:localDx = dx * u.x + dy * u.yandlocalDy = dx * v.x + dy * v.y. - Anchor Pinning via Center Shift: Displaces the element center in world space (
deltaCenterPaper = deltaCenterLocal_x * u + deltaCenterLocal_y * v) to lock the opposite corner or edge stationary. - Dynamic Orientation-Aware Cursors (
getRotatedHandleCursor): Rotates cursor icons according to angle, so a handle at the visual bottom-left showsnesw-resizeinstead of an unrotated north-east cursor. - Aspect Ratio Locking (
Shift/data-aspect-lock): Proportional resizing works across all rotation angles with exact aspect ratio preservation. - Center Resizing (
Ctrl/Cmd): Expands both sides symmetrically along local axes while holding the element center stationary. - Inner Image Content Scaling: Inner
<img>tags scale proportionally with the bounding box when resizing rotated images. - Crop Mode Preservation: Interactive crop frame resizing maintains uncropped image positioning under rotation.
- Table Min-Bounds Protection: Respects table physical dimensions (
minW,minH) so tables cannot collapse past minimum size. - Undo / Redo Integration: Resizing commits history snapshots cleanly upon mouse release via
pushHistory().
All cachebusters across index.html, the Service Worker cache (open-publisher-v5-5-0), and subsystem headers have been synchronized to v5.5.0.
🔍 Problems Solved & Key Enhancements
- Unprojected Screen Deltas on Rotated Elements:
- Root Cause: When an element was rotated by 180 degrees around its center, the selection overlay handles rotated with it. The handle visually positioned at the bottom-left was the
ne(northeast) handle. Moving the mouse down-and-left (dx < 0, dy > 0) applied deltas directly against unrotated box coordinates (rawW = d.w + dx), causing the element to shrink instead of expand. -
Solution in v5.5.0: Projected screen deltas
(dx, dy)onto local unit vectorsuandv. For an element rotated 180°,u = (-1, 0)andv = (0, -1). A down-left movement yieldslocalDx > 0andlocalDy < 0, correctly increasing both width and height as expected. -
Anchor Pinning Inversion on Inverted Elements:
- Root Cause: Legacy resizing adjusted
newL = d.l + dxandnewT = d.t + dyalong page axes. For rotated elements, adjustingleftandtopin paper space shifted the element center in the wrong direction relative to the grabbed corner, leaving the grabbed handle stationary while the opposite corner moved. -
Solution in v5.5.0: Calculated dimension deltas (
deltaW,deltaH) in local space, determined the local center shift (deltaCenterLocalX,deltaCenterLocalY), and transformed this shift into paper coordinates (deltaCenterPaper). The unrotated top-left position is then computed asnewL = newCx - rawW / 2andnewT = newCy - rawH / 2. This guarantees the opposite handle stays pinned at(0, 0)displacement. -
Mismatched Handle Cursor Orientations:
- Root Cause: Selection handles hardcoded cursor styles matching unrotated orientations (e.g.
rh-nealways displayedne-resizeornesw-resizeregardless of angle). When rotated 90° or 180°, cursor arrows pointed perpendicular or opposite to the actual pull direction. -
Solution in v5.5.0: Created
window.getRotatedHandleCursor(dir, rotDeg), which adds the element's rotation angle to each handle's base angle and selects the visual cursor icon matching the physical direction on screen. -
Proportional Aspect Ratio Scaling Under Rotation:
- Root Cause: Aspect ratio locking (
Shiftkey ordata-aspect-lock="true") relied on unrotated axis comparisons (Math.abs(dx) > Math.abs(dy)), leading to skewed or jumping dimensions when objects were rotated 90° or 180°. -
Solution in v5.5.0: Calculated scale factors along local axes (
scaleFactorX = rawW / d.w,scaleFactorY = rawH / d.h), picked the dominant scale based on the handle being pulled, scaled both dimensions proportionally, and applied the exact center shift projection. -
Uncropped Image 100% Fill Protection & Auto-Heal:
- Root Cause: Uncropped images, smart images, and clipart rely on CSS percentage sizing (
width: 100%; height: 100%). EvaluatingparseFloat("100%")previously returned the numerical value100, which forcefully injected inlinewidth: 100px; height: 100px;during mouse movement, causing inner images to collapse into tiny 100x100 squares within larger bounding boxes. - Solution in v5.5.0: Standard uncropped images strictly retain CSS
width: 100%; height: 100%, dynamically expanding and contracting with their parent bounding box during rotation and resize. Addedwindow.healUncroppedImage(el)which automatically recovers any previously affected images upon selection, while preserving dedicated pixel math exclusively for custom legacy pixel crops.
🛠️ Complete Architectural Breakdown
1. Affine Basis Extraction (window.getElementTransformBasis)
:::javascript
window.getElementTransformBasis = function(el) {
let u = { x: 1, y: 0 };
let v = { x: 0, y: 1 };
let rotRad = 0;
if (!el) return { u, v, rotRad };
const compStyle = window.getComputedStyle(el);
const tr = compStyle.transform || el.style.transform;
if (tr && tr !== 'none') {
const m = tr.match(/^matrix\(([^)]+)\)$/);
if (m) {
const vals = m[1].split(',').map(parseFloat);
const a = vals[0], b = vals[1], c = vals[2], d = vals[3];
const uLen = Math.hypot(a, b);
const vLen = Math.hypot(c, d);
if (uLen > 0.0001) u = { x: a / uLen, y: b / uLen };
if (vLen > 0.0001) v = { x: c / vLen, y: d / vLen };
rotRad = Math.atan2(b, a);
} else {
const m3d = tr.match(/^matrix3d\(([^)]+)\)$/);
if (m3d) {
const vals = m3d[1].split(',').map(parseFloat);
const a = vals[0], b = vals[1], c = vals[4], d = vals[5];
const uLen = Math.hypot(a, b);
const vLen = Math.hypot(c, d);
if (uLen > 0.0001) u = { x: a / uLen, y: b / uLen };
if (vLen > 0.0001) v = { x: c / vLen, y: d / vLen };
rotRad = Math.atan2(b, a);
} else {
const rMatch = tr.match(/rotate\(([-\d.]+)deg\)/);
if (rMatch) {
rotRad = parseFloat(rMatch[1]) * (Math.PI / 180);
u = { x: Math.cos(rotRad), y: Math.sin(rotRad) };
v = { x: -Math.sin(rotRad), y: Math.cos(rotRad) };
}
const sxMatch = tr.match(/scaleX\(([-\d.]+)\)/);
if (sxMatch && parseFloat(sxMatch[1]) < 0) {
u = { x: -u.x, y: -u.y };
}
const syMatch = tr.match(/scaleY\(([-\d.]+)\)/);
if (syMatch && parseFloat(syMatch[1]) < 0) {
v = { x: -v.x, y: -v.y };
}
}
}
}
return { u, v, rotRad };
};
2. Local Delta Projection & Center Displacement Math
:::javascript
// Screen deltas compensated for zoom
const zoom = state.zoom || 1;
const dx = (e.clientX - d.startX) / zoom;
const dy = (e.clientY - d.startY) / zoom;
// Project screen deltas onto element's local basis axes
const localDx = dx * u.x + dy * u.y;
const localDy = dx * v.x + dy * v.y;
let deltaW = 0;
let deltaH = 0;
if (isCenterResize) {
if (d.dir.includes('e')) deltaW = 2 * localDx;
else if (d.dir.includes('w')) deltaW = -2 * localDx;
if (d.dir.includes('s')) deltaH = 2 * localDy;
else if (d.dir.includes('n')) deltaH = -2 * localDy;
} else {
if (d.dir.includes('e')) deltaW = localDx;
else if (d.dir.includes('w')) deltaW = -localDx;
if (d.dir.includes('s')) deltaH = localDy;
else if (d.dir.includes('n')) deltaH = -localDy;
}
let rawW = Math.max(minW, d.w + deltaW);
let rawH = Math.max(minH, d.h + deltaH);
deltaW = rawW - d.w;
deltaH = rawH - d.h;
// Calculate center shift in local element coordinates
let deltaCenterLocalX = 0;
let deltaCenterLocalY = 0;
if (!isCenterResize) {
if (d.dir.includes('e')) deltaCenterLocalX = deltaW / 2;
else if (d.dir.includes('w')) deltaCenterLocalX = -deltaW / 2;
if (d.dir.includes('s')) deltaCenterLocalY = deltaH / 2;
else if (d.dir.includes('n')) deltaCenterLocalY = -deltaH / 2;
}
// Transform local center displacement back to paper coordinates
const deltaCenterPaperX = deltaCenterLocalX * u.x + deltaCenterLocalY * v.x;
const deltaCenterPaperY = deltaCenterLocalX * u.y + deltaCenterLocalY * v.y;
const newCx = d.cx + deltaCenterPaperX;
const newCy = d.cy + deltaCenterPaperY;
const newL = newCx - rawW / 2;
const newT = newCy - rawH / 2;
3. Orientation-Aware Handle Cursor Calculation (window.getRotatedHandleCursor)
:::javascript
window.getRotatedHandleCursor = function(dir, rotDeg) {
const angleMap = { 'n': 0, 'ne': 45, 'e': 90, 'se': 135, 's': 180, 'sw': 225, 'w': 270, 'nw': 315 };
const baseAngle = angleMap[dir];
if (baseAngle === undefined) return 'pointer';
let totalAngle = Math.round((baseAngle + rotDeg) % 360);
if (totalAngle < 0) totalAngle += 360;
const index = Math.round(totalAngle / 45) % 8;
const cursors = [
'ns-resize', 'nesw-resize', 'ew-resize', 'nwse-resize',
'ns-resize', 'nesw-resize', 'ew-resize', 'nwse-resize'
];
return cursors[index];
};
🛠️ Files Modified & Synchronized
- extensions/system-patches.js: Added affine basis extraction (
getElementTransformBasis), dynamic cursor orientation (getRotatedHandleCursor), updated selection overlay rendering, and installed rotation-aware resize handler inhandleMouseDownandhandleMouseMove. - canvas/interaction-mouse.js: Synchronized rotation-aware resize calculations, drag state basis capture, and image dimensions.
- extensions/smart-images.js: Synchronized rotation-aware resize engine for smart images and crop mode.
- sw.js: Bumped Service Worker cache name to
open-publisher-v5-5-0and version header tov5.5.0. - index.html: Synchronized all script tags, stylesheets, and asset cachebusters to
?v=5.5.0. - style.css: Bumped proofing and theme studio version headers to
v5.5.0. - ui/dashboard.js: Bumped template fetch queries to
?v=5.5.0. - tools/proofing/spellcheck-engine.js: Bumped proofing engine header to
v5.5.0. - ui/modals/options-modal.js: Bumped options modal header to
v5.5.0. - ui/sidebar-context.js: Bumped sidebar context header to
v5.5.0.
🧪 Verification & Automated Testing
Validated through automated Playwright end-to-end test suite (test_v5_5_0_complete_verification.py):
| Test Scenario | Verification Metric | Result | Output Details |
|---|---|---|---|
| 0° Standard SE Drag | Move SE handle by (40px, 30px) | Passed | Grabbed handle moved (40.0, 30.0); opposite NW handle pinned at (0.0, 0.0) |
| 0° Standard NW Drag | Move NW handle by (-30px, -20px) | Passed | Grabbed handle moved (-30.0, -20.0); opposite SE handle pinned at (0.0, 0.0) |
| 180° Upside Down Visual BL Drag | Drag visual bottom-left (ne) by (-30px, +30px) |
Passed | Grabbed handle moved (-30.0, 30.0); opposite sw handle pinned at (0.0, 0.0); element expanded from 200x100 to 250x150 |
| 180° Upside Down Visual TR Drag | Drag visual top-right (sw) by (+30px, -30px) |
Passed | Grabbed handle moved (30.0, -30.0); opposite ne handle pinned at (0.0, 0.0) |
| 90° Orthogonal SE Drag | Move SE handle on 90° rotated box | Passed | Grabbed handle moved (-30.0, 40.0); opposite pinned at (0.0, 0.0) |
| 270° Orthogonal SE Drag | Move SE handle on 270° rotated box | Passed | Grabbed handle moved (30.0, -40.0); opposite pinned at (0.0, 0.0) |
Horizontally Flipped (scaleX(-1)) |
Pull east handle outward | Passed | Width expanded cleanly from 200px to 250px |
| Aspect Ratio Lock at 180° | Drag corner with aspect ratio lock active | Passed | Width 300px, Height 150px; exact 2.000 ratio preserved |
| Center Resize at 180° | Hold Ctrl key while dragging corner | Passed | Center shift: 0.00px; element expanded symmetrically from center |
| Image Scaling at 180° | Resize rotated image container | Passed | Inner <img> scaled to 250x200 matching container exactly |
| Undo / Redo Reversion | Press undo after rotated resize | Passed | Element dimensions restored from 250px back to 200px |
| Dynamic Handle Cursors | Inspect handle CSS cursor styles on 180° element | Passed | Bottom-left handle displays nesw-resize; bottom handle displays ns-resize |
✅ Complete v5.5.0 Feature & Verification Checklist
- [x] Rotation-Aware Handle Tracking: Grabbing handles on rotated or upside-down elements follows the cursor at 1:1 precision.
- [x] Opposite Anchor Pinning: The opposite corner or edge remains completely stationary in paper space during resize.
- [x] 2D Affine Basis Extraction: Computed local unit vectors
uandvfrom CSS matrices and transformation strings. - [x] Local Projection Math: Screen deltas project onto element axes via dot products before dimension adjustment.
- [x] Orientation-Adjusted Cursors: Handle CSS cursors dynamically rotate to match visual orientation on screen.
- [x] Aspect Ratio Compatibility: Shift-key and locked aspect ratio scaling work across all rotation angles.
- [x] Center Resize Compatibility: Ctrl-key center resize keeps the element center stationary under rotation.
- [x] Image Scaling Compatibility: Inner image dimensions scale proportionally with rotated bounding containers.
- [x] Crop Mode Compatibility: Crop box resizing compensates for element rotation without image displacement.
- [x] Table Clamping Compatibility: Preserves minimum dimension bounds for tables and constrained elements.
- [x] Undo / Redo Safety: Resizing operations integrate seamlessly with
pushHistory()snapshots. - [x] Cachebuster Synchronization: Updated all script tags, stylesheet links, asset queries, and Service Worker cache to
v5.5.0. - [x] Automated Testing: 100% test pass rate across end-to-end Playwright test suite (12/12 passing).
🎉 Version 5.5.0 - Open Publisher