Skip to content

Conversation

@killerwolf
Copy link
Owner

Adds a visual loading spinner to the visual-image-tool.

The spinner is displayed when the tool is instantiated and the image is loading. It is hidden once the image is fully loaded and the tool's UI elements are ready.

This improves your experience by providing visual feedback during the initial loading phase, preventing the perception of unresponsiveness.

Changes include:

  • Added this.spinnerElement and this.initialLoadComplete fields.
  • Created and styled a spinner DIV element in _prepareContainer().
  • Added CSS keyframes for the spinner animation.
  • Implemented logic in _updateScaling() to hide the spinner upon initial image load.
  • Ensured the spinner element is removed in the destroy() method.

Adds a visual loading spinner to the `visual-image-tool`.

The spinner is displayed when the tool is instantiated and the image is loading.
It is hidden once the image is fully loaded and the tool's UI elements are ready.

This improves your experience by providing visual feedback during the initial loading phase, preventing the perception of unresponsiveness.

Changes include:
- Added `this.spinnerElement` and `this.initialLoadComplete` fields.
- Created and styled a spinner DIV element in `_prepareContainer()`.
- Added CSS keyframes for the spinner animation.
- Implemented logic in `_updateScaling()` to hide the spinner upon initial image load.
- Ensured the spinner element is removed in the `destroy()` method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant