Make mactions nest properly in SVG output
This commit is contained in:
parent
c68c690468
commit
4c85dc09b9
|
@ -49,6 +49,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
||||||
var selected = this.selected();
|
var selected = this.selected();
|
||||||
if (selected.type == "null") {this.SVGsaveData(svg);return svg;}
|
if (selected.type == "null") {this.SVGsaveData(svg);return svg;}
|
||||||
svg.Add(this.SVGdataStretched(this.Get("selection")-1,HW,D));
|
svg.Add(this.SVGdataStretched(this.Get("selection")-1,HW,D));
|
||||||
|
svg.removeable = false;
|
||||||
this.SVGhandleHitBox(svg);
|
this.SVGhandleHitBox(svg);
|
||||||
this.SVGhandleSpace(svg);
|
this.SVGhandleSpace(svg);
|
||||||
this.SVGhandleColor(svg);
|
this.SVGhandleColor(svg);
|
||||||
|
@ -56,10 +57,12 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
||||||
return svg;
|
return svg;
|
||||||
},
|
},
|
||||||
SVGhandleHitBox: function (svg) {
|
SVGhandleHitBox: function (svg) {
|
||||||
var frame = SVG.addElement(svg.element,"rect",
|
var frame = SVG.Element("rect",
|
||||||
{width:svg.w, height:svg.h+svg.d, y:-svg.d, fill:"none", "pointer-events":"all"});
|
{width:svg.w, height:svg.h+svg.d, y:-svg.d, fill:"none", "pointer-events":"all"});
|
||||||
|
svg.element.insertBefore(frame,svg.element.firstChild);
|
||||||
var type = this.Get("actiontype");
|
var type = this.Get("actiontype");
|
||||||
if (this.SVGaction[type]) {this.SVGaction[type].call(this,svg,frame,this.Get("selection"))}
|
if (this.SVGaction[type])
|
||||||
|
{this.SVGaction[type].call(this,svg,svg.element,this.Get("selection"))}
|
||||||
},
|
},
|
||||||
SVGstretchH: MML.mbase.prototype.SVGstretchH,
|
SVGstretchH: MML.mbase.prototype.SVGstretchH,
|
||||||
SVGstretchV: MML.mbase.prototype.SVGstretchV,
|
SVGstretchV: MML.mbase.prototype.SVGstretchV,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user