GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — The error dialog ignores the image base path set by the application · Issue #1331 · maxGraph/maxGraph

The error dialog ignores the image base path set by the application #1331

New issue
Copy link
New issue
Copy link
Open
Bug
Open
The error dialog ignores the image base path set by the application#1331
Bug
Copy link

Description

@redfish4ktc
redfish4ktc
opened on Nov 17, 2026
Issue body actions

Describe the bug

guiUtils.GuiConfig.errorImage is computed once, when the @maxgraph/core module is imported, see guiUtils.ts. At that time, Client.imageBasePath still has its default value, since an application can only call Client.setImageBasePath after the import. So the error dialog displayed by guiUtils.error() always requests ./error.gif, whatever base path the application configures, unless it passes its own icon.

This is the only default image of @maxgraph/core with this problem. The other ones (AbstractGraph.options.collapsedImage and expandedImage, the images of MaxWindow, MaxPopupMenu.submenuImage, the separator of EditorToolbar) are instance fields or are read at call time, so they use the base path set before the object is created.

Found while reviewing a change of the Storybook setup, which now sets the image base path for all stories in packages/html/.storybook/preview.ts. No story uses the error dialog today.

To Reproduce

import { Client, guiUtils } from '@maxgraph/core';

Client.setImageBasePath('/assets/maxgraph/images');
guiUtils.error('Something went wrong', 300, true);

The image of the dialog requests ./error.gif instead of /assets/maxgraph/images/error.gif.

Expected behavior

The error dialog uses the image base path configured with Client.setImageBasePath, as the other default images do.

In mxGraph, mxUtils.errorImage was also computed at load time, but it worked: the base path came from the global mxImageBasePath variable, which had to be set before loading mxClient. With ES modules, Client.setImageBasePath necessarily runs after the import, so the mxGraph approach no longer applies.

A possible fix: resolve the default when the dialog is built, for instance by keeping errorImage unset (or null) by default and falling back to ${Client.imageBasePath}/error.gif in guiUtils.error().

Screenshots

Not applicable.

Environment

  • maxGraph version or commit: main at dac5e0a
  • Desktop or mobile: any
  • OS and version: any
  • Browser and version: any
  • Node/npm version (if applicable): not applicable
  • Used frameworks (if applicable): none

Additional context

None.

Activity

  1. redfish4ktc
    added the
    Bug
    issue type on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.