Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6749253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:40:06+00:00 2026-05-26T12:40:06+00:00

We have code that loads SVG via Ajax and interacts via Javscript. The SVG

  • 0

We have code that loads SVG via Ajax and interacts via Javscript. The SVG represents wiring diagrams – that is paths (‘wires’) and text (‘labels for wires’). The paths and text objects are grouped under a node – each node also contains a node: using ID’s we place in the desc node we can respond to the click – e.g. by popping up details of the ;selected wire’.

In general the system works perfectly – but occasionally the SVG click event we get back seems to belong to ‘another wire’. Here is an example of the geomtry when this happens:

             ---------------
             -
             -
     ....... -.....Wire1....
             -
             -
             -
 ------Wire2--

(I hope this is clear – Wire1 runs horizontal, Wire 2 is a zig zag shape, running vertically as it crosses Wire1)

In this geometry the behaviour we see is:

  • Click on Wire1 Path –> event points at Wire1 Path

    Click on Wire1 Text –> event points at Wire2 Path (!Wrong)

    Click on Wire2 Path –> event points at Wire2 Path

    Click on Wire2 Text –> event points at Wire2 Text

Changing the z order (Writing Wire1 After Wire2 in the SVG file) has no effect.

Representing wires by a series of short paths (rather than one long path) fixes this issue but increases the files size (and these wiring diagrams are massive).

One would like to thing this was just one bug in one SVG browser – but it is observable in Safari 5 and Mozilla. (Which I assume do not share a common code base). Which suggests that under some circumstance SVG defines the ‘active clickable area’ of a Z shaped path to be its bounding rectangle.

How can we control this? Is there a header tag attribute or other work round that would restrict the active area of any path to the path itself?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:40:06+00:00Added an answer on May 26, 2026 at 12:40 pm

    If you have a fill on your paths (even one the same color as your background) that would clearly explain this. Do you have a test case you can share showing the problem?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have code that loads SVG via Ajax and then interacts via Javscript. Under
I have this code that performs an ajax call and loads the results into
I have code that loads a bunch of images into hidden img elements and
I have some code that loads an image file off the web and puts
I have the following code that loads a user's Active Directory DirectoryEntry object from
I have an Java applet that loads native code through JNI. Everything worked just
I have some code that loads the serial ports into a combo-box: List<String> tList
I have this code that loads an xml file using javascript: function getXmlDocument(sFile) {
I have some code that loads a default configuration file and then allows users
I have a message board, and I have some code that loads new messages

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.