Can I use iscroll brushes / scaling with delimited overlays?

I am trying to overlay a div ("childItem") at a specific position on top of a larger div ("parentContainer") that has a background image. Then I use iscroll to enable the pinch / zoom of the parent div. It works. However, the child div does not maintain its position relative to the updated zoom level of the parent div after the clip / zoom is completed.

Basically, the background image is enlarged, but the position of the child div is not enlarged. Any idea on how to reposition childItem after scaling completed by iscroll? Example:

<div id="parentContainer">
    <img src="map_background.png" />
    <div id="childItem" style="top:40px;left:40px;">
        <img src="map_icon.png" />
    </div>
</div>

<script type="text/javascript">
var myScroll = new iScroll('parentContainer', { zoom: true });
</script>
+3
source share
1 answer

, . , , - div div, .

<div id="parentContainer">
    <div>
        <img src="map_background.png" />
        <div id="childItem" style="top:40px;left:40px;">
            <img src="map_icon.png" />
        </div>
    </div>
</div>
+3

All Articles