• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SVG line elements disappear when markers are used

Explorer ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

I wrote a program that generates SVG XML. These SVG fragments are exceprted from a much larger document, but here are the parts that are relevant to my plea for help.

 

 

 

<defs>
  <style type="text/css"><![CDATA[
    .gxasc { fill: black; stroke: white; stroke-width: 2px }
    .gxasc2 { fill: black; stroke: black; stroke-width: 2px }
    .gxasc5 { fill: none; stroke: black; stroke-width: 1px; marker-end: url(#motion) }
    ]]>
  </style>
  <marker id="motion" markerWidth="1" markerHeight="5" refX="0" refY="2.5" orient="auto">
    <line style="fill: none; stroke: black; stroke-width: 1px" x1="0" y1="0" x2="0" y2="5"/>
  </marker>
</defs>
<g id="ascc-stars" class="gxasc">
  <g>
    <line class="gxasc5" x1="2516.0843" y1="1196.6601" x2="2719.3656" y2="1095.6923"/>
    <circle cx="2516.0843" cy="1196.6601" r="20.522"/>
    <line class="gxasc2" x1="2495.5623" y1="1220.1821" x2="2536.6063" y2="1220.1821"/>
  </g>
  <circle cx="939.5155" cy="957.7022" r="14.606"/>
  <circle cx="1868.2093" cy="2512.765" r="12.766"/>
  <circle cx="3388.3147" cy="2570.5778" r="12.742"/>
  <circle cx="3669.6188" cy="1144.8815" r="12.656"/>
</g>

 

 

 

The global class .gxasc5 is attributed to a <line> element, and that class defines the style for those many elements, which includes a marker-end style, pointing to the <marker> with id="motion". That marker draws a perpendicular line at the end of the line darwn out by the <line> element with the "gxasc5" class. Typical use of SVG markers. But when I open the generated SVG in Illustrator 24.3, the little marker line is right where I expect it, but the line to which it should be attached is nowehere to be found. That path is just not there. What am I doing wrong here???

TOPICS
Bug , Draw and design , Import and export

Views

448

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 03, 2020 Sep 03, 2020

Illustrator does not "open" SVG, but it imports them translating them into its own DOM.

 

It doesn't support the full SVG standard. And also when exporting this again from Illustrator, certain parts might get omitted.

 

If you want more and better support of SVG, you can make a feature request: http://illustrator.uservoice.com

Votes

Translate

Translate
Adobe
Community Expert ,
Sep 03, 2020 Sep 03, 2020

Copy link to clipboard

Copied

Illustrator does not "open" SVG, but it imports them translating them into its own DOM.

 

It doesn't support the full SVG standard. And also when exporting this again from Illustrator, certain parts might get omitted.

 

If you want more and better support of SVG, you can make a feature request: http://illustrator.uservoice.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 03, 2020 Sep 03, 2020

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 27, 2020 Oct 27, 2020

Copy link to clipboard

Copied

LATEST

An Illustrator Engineer reported on the above bug report over a year ago that it was Under Review and that they're working on it. Still not working in Illustrator 2021 (25.0). Very disappointing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines