Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
284 views
in Technique[技术] by (71.8m points)

javascript - 用div覆盖SVG的一部分(Overlaying parts of an SVG with a div)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...