File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/pstricks/src/lib Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1111 " Bash(pnpm:*)" ,
1212 " Bash(ls:*)" ,
1313 " Bash(lerna list:*)" ,
14- " Bash(npx lerna list:*)"
14+ " Bash(npx lerna list:*)" ,
15+ " Bash(find:*)"
1516 ],
1617 "deny" : []
1718 }
Original file line number Diff line number Diff line change @@ -447,7 +447,6 @@ const psgraph: any = {
447447 const x = this . x ;
448448 const y = this . y ;
449449
450- div . innerHTML = this . text ;
451450 div . className = 'math' ;
452451 div . style . visibility = 'hidden' ;
453452 div . style . position = 'absolute' ;
@@ -467,11 +466,13 @@ const psgraph: any = {
467466
468467 const mathJax = ( window as any ) . MathJax ;
469468 if ( mathJax && mathJax . typesetPromise ) {
469+ div . innerHTML = this . text ;
470470 mathJax . typesetPromise ( [ div ] ) . then ( done ) . catch ( ( err : any ) => {
471471 console . error ( 'MathJax typesetting failed:' , err ) ;
472472 done ( ) ;
473473 } ) ;
474474 } else {
475+ div . innerHTML = this . text ;
475476 done ( ) ;
476477 }
477478 } ,
@@ -571,6 +572,10 @@ const psgraph: any = {
571572 } ) ;
572573 }
573574
575+ // Clear existing rput elements to prevent duplication
576+ const existingRputElements = el . querySelectorAll ( '.math' ) ;
577+ existingRputElements . forEach ( ( element : any ) => element . remove ( ) ) ;
578+
574579 this . plot . rput . forEach ( ( rput : any ) => {
575580 psgraph . rput . call ( rput . data , el ) ;
576581 } ) ;
You can’t perform that action at this time.
0 commit comments