Skip to Content
Former Member
Apr 07, 2014 at 03:15 PM

Image Zooming and Custom Attribute on SAP UI5 Image


I have an image component like so:

var imageViewer = new sap.ui.commons.Image("BIGIMAGE", {src:aData[index].ImageSource}).addStyleClass("image-dialog");

I am wanting to use an image zooming script on this image which requires an additional custom attribute (data-zoom-image) on the IMG so:

<img id="zoom_01" src="small/image1.png" data-zoom-image="large/image1.jpg"/>

How do I go about adding this additional tag? If anyone has a quick example that would be great.


Here is the zooming script I am using: