Skip to content

fix: [1135] カスタムキー定義のlayerTransXについて、Reverseの反転に対応できていない問題を修正 - #2178

Merged
cwtickle merged 3 commits into
developfrom
hotfix/1135-invert-layer
Jul 31, 2026
Merged

fix: [1135] カスタムキー定義のlayerTransXについて、Reverseの反転に対応できていない問題を修正#2178
cwtickle merged 3 commits into
developfrom
hotfix/1135-invert-layer

Conversation

@cwtickle

@cwtickle cwtickle commented Jul 31, 2026

Copy link
Copy Markdown
Owner

🔨 変更内容 / Details of Changes

1. fix: カスタムキー定義のlayerTransXについて、Reverseの反転に対応できていない問題を修正

  • カスタムキー定義のlayerTransXでスクロール方向により別のtransitionを指定している場合、
    Reverse設定を行うと想定しない方向にステップゾーンや矢印が表示される問題が発生していました。
  • 今回の変更で、Reverse設定時はTranstionの設定を反転した内容を反映するように変更します。
    • 例. rotate(30deg) -> rotate(-30deg)
  • なお、反転の対象は限定しています。scaleのように逆転すると困るケースがあるためです。
	const targetFunctions = [
		'rotate', 'rotateX', 'rotateY', 'rotateZ', 'rotate3d',
		'translate', 'translateX', 'translateY', 'translateZ', 'translate3d',
		'skew', 'skewX', 'skewY'
	];
  • スクロール反転・階層移動(scrollch_data)にも同様の処理があり、対処済みです。

🔖 関連Issue, 変更理由 / Related Issues, Reason for Changes

  1. layerTransXでReverseでの動きを想定していなかったため。

📷 スクリーンショット / Screenshot

📝 その他コメント / Other Comments

@cwtickle cwtickle added bug Something isn't working func11:KeyConfig キーコンフィグ、キー定義関係 need-to-fix-supportVer. サポートバージョンへの修正が必要 labels Jul 31, 2026
@cwtickle
cwtickle marked this pull request as draft July 31, 2026 06:58
@cwtickle
cwtickle marked this pull request as ready for review July 31, 2026 06:58
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 95c45560-6317-4ab5-bf98-5f58771df83b

📥 Commits

Reviewing files that changed from the base of the PR and between a2de112 and 503bdba.

📒 Files selected for processing (1)
  • js/danoni_main.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • js/danoni_main.js

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Fixed reverse playback so supported visual transformations correctly invert their direction.
    • Corrected scrolling and layer movement behavior when reverse mode is active.
    • Improved initial layer positioning for more consistent visual playback.

Walkthrough

Reverse playback now inverts numeric values in selected CSS transform functions. Scroll-change transforms and layer transforms use the prepared inverted values. Main-layer creation reads layer transforms from g_workObj.

Changes

Reverse transform handling

Layer / File(s) Summary
Transform sign inversion
js/danoni_main.js
Adds invertSpecificTransforms for numeric arguments in rotate, translate, and skew functions. Scroll-change transforms use it during reverse playback.
Layer transform preparation and application
js/danoni_main.js
Initializes and prepares g_workObj.layerTrans, applies inversion during reverse playback, and uses the prepared values during main-layer creation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the fix for Reverse inversion in custom layerTransX definitions.
Description check ✅ Passed The description explains the layerTransX Reverse issue, the inversion behavior, and the limited transform-function scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/1135-invert-layer

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.45.0)
js/danoni_main.js

ast-grep timed out on this file


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
js/danoni_main.js (1)

14067-14092: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use backticks for string literals to match the file's convention.

This function uses single-quoted strings ('rotate', 'g', '-'), while the rest of js/danoni_main.js consistently uses backtick template literals for string values (for example `mainSprite${j}` at Line 14670, `layerTrans${keyCtrlPtn}` at Line 14167). Align the new function with the existing style for consistency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@js/danoni_main.js` around lines 14067 - 14092, Update
invertSpecificTransforms to use backtick template literals for all string
literals, including target function names, the regular-expression flag, and the
sign prefix/suffix values, while preserving the existing transformation
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@js/danoni_main.js`:
- Around line 14067-14092: Update invertSpecificTransforms to use backtick
template literals for all string literals, including target function names, the
regular-expression flag, and the sign prefix/suffix values, while preserving the
existing transformation behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 140718e0-1b31-41b5-80a2-e3f769b917ef

📥 Commits

Reviewing files that changed from the base of the PR and between 61038d7 and a2de112.

📒 Files selected for processing (1)
  • js/danoni_main.js

@cwtickle
cwtickle merged commit 34a3719 into develop Jul 31, 2026
4 checks passed
@cwtickle
cwtickle deleted the hotfix/1135-invert-layer branch August 1, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working func11:KeyConfig キーコンフィグ、キー定義関係 need-to-fix-supportVer. サポートバージョンへの修正が必要

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant