cti-stix-visualization icon indicating copy to clipboard operation
cti-stix-visualization copied to clipboard

Relationship labels misplaced in Firefox when using <base href="/">

Open StephenThomson opened this issue 7 years ago • 1 comments

In Firefox, when using <base href="/"> the text labels for the relationships are placed at 0,0 on the canvas rather than on the arrow. This is because the xlink in the textPath is a relative link and if the base href is set to / ff will resolve the link relative to that.

<textPath xmlns:xlink="http://www.w3.org/1999/xlink" **xlink:href="#link_1"** startOffset="20%">indicates</textPath>

If you need to use the Visualiser in Angular there is a work around: remove <base href="/"> from index.html and then in app.module.ts add

import {APP_BASE_HREF} from '@angular/common';

@NgModule({
  declarations: [AppComponent],
  imports: [routing /* or RouterModule */], 
  providers: [{provide: APP_BASE_HREF, useValue : '/' }]
]); 

https://stackoverflow.com/questions/34535163/angular-2-router-no-base-href-set

StephenThomson avatar Jan 11 '18 13:01 StephenThomson

Thanks, @StephenThomson . I've seen this behavior before, and thought I had made an issue for it, but I'm not finding it, so thanks for opening this.

gtback avatar Jan 11 '18 15:01 gtback