We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Diagram Background Image Size

Thread ID:

Created:

Updated:

Platform:

Replies:

119929 Aug 14,2015 10:40 PM UTC Aug 17,2015 02:07 PM UTC JavaScript 1
loading
Tags: ejDiagram
Luis B.Chicaiza
Asked On August 14, 2015 10:40 PM UTC

Hello, good afternoon

I'm working with ejDiagram, i'm trying to setup the backgroundImage to the diagram, what i saw is whatever image i set, is scaled to my browser window size, in this way i lose the image original size, is there any way to set backgroundImage avoiding image scaling and preserving the same image size?

Thank you

Shyam G [Syncfusion]
Replied On August 17, 2015 02:07 PM UTC

Hi Luis

Thanks for using Syncfusion products.

We have created a simple sample to achieve your requirement and it is available in the below link for download. Please refer the code snippet below.

Code snippet:

$("#diagram").ejDiagram({

 

            backgroundImage: "themes/images/dashboard_img/Airline_reservation.png",
        });

$(window).load(function () {            

            var svg = document.getElementById("diagram_canvas_backgroundLayer").firstChild;

            svg.removeAttribute("preserveAspectRatio");
        });

Sample:http://www.syncfusion.com/downloads/support/forum/119929/ze/backgroundimage-1697125651

Please let us know if any concerns.

Regards,
Shyam G


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;