I'm trying make certain parts of an SVG rendered by OpenSheetMusicDisplay clickable.
(我正在尝试使由OpenSheetMusicDisplay呈现的SVG的某些部分可点击。)
My strategy is to overlay them with transparent divs. (我的策略是用透明的div覆盖它们。)
Every graphical OSMD object has a BoundingBox with relative and absolut positions in SVG coordinates. (每个图形OSMD对象都有一个BoundingBox ,在SVG坐标中具有相对位置和绝对位置。)
How do I translate these coordinates to something I can put into div.style.left
, etc? (如何将这些坐标转换为可以放入div.style.left
等的内容?)
ask by phs_lrz translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…