This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
JeanA  
#1 Posted : Wednesday, March 4, 2015 10:21:57 AM(UTC)
JeanA

Rank: Newbie

Groups: Guest
Joined: 10/20/2014(UTC)
Posts: 1

Hi,

We bought GraphicsMill on the understanding that it would work in MVC5 environments. Specifically, we are interested in the CanvasViewer.

However, we're not having much success in integrating it in the environment. Currently, we're making use of a partial view which loads GraphicsMill from an ascx controller.

Graphicsmill does load, but we're having trouble doing certain operations:

e.g. Trying to insert a PlainTextVObject into a view results in this error:

Uncaught TypeError: Cannot read property 'UpdateByPlainTextVObjectData' of undefined

When we tried delving deeper into this issue, it looks like a problem in this code:

Code:
var call = Function.createDelegate(this, function () {
	        var canvas = this.get_canvas();
	        if (canvas != null && canvas.get_isInitialized()) {
	            var args = [canvas.get_data(true)];
	            if (data != null)
	                args = args.concat(data);
	            args = args.concat(onSuccess, onFailure);

	            this._isCallingService = true;
	            var service = this.ns.Service;
	            service[methodName].apply(service, args);
	        }
	    });

this.ns.Service is null.

Please advise - also it would be great help if you can provide us with an example of GraphicsMill being used in an MVC5 environment.

Fedor  
#2 Posted : Thursday, March 5, 2015 2:58:43 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hi Jean,

Canvas Viewer strongly depends on Web Forms/MS Ajax technologies so it is not possible to use the control in MVC directly. We plan to get rid of dependency on Web Forms this year.

Currently the easiest way to integrate the Canvas Viewer control to MVC project is to host it on separate .aspx and integrate into the page using IFrame tag. As host and IFrame pages are on the same domain you should experience a problem of cross domain interaction.

If you need an example please let me know.

Edited by user Thursday, March 5, 2015 3:00:06 AM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.