on 05-13-2015 10:00 PM
Hey guys. I tried searching but came up short. Maybe someone can point me to the answer or give one here
I'm in the midst of trying to port over a Design Studio Extension to Lumira for fun. In order for me to get this to work, I need to load a few d3 plugins along the way, just as I must in Design Studio. I've gotten it working in WebIDE just fine, however it appears that the paths are not the same when packing it up and running it local.
My basic question is, what is the approach for loading additional .js files in a Lumira Extension? These files are generally AMD-aware so I can use require.js if that's a best practice... My attempts have come up short and are probably bad attempts
Below is my code snippet in WebIDE showing off my ignorance (Click to enlarge)
I've added 2 files (shown in blue). One is a d3 hexbin plugin and the other is d3 v3 (d3v3 is AMD-compliant and doesn't interfere w/CVOM, I've already been down that path).... The section in green shows a successful (albeit primitive) output...
The code in orange is where I'm unsure if is the right way of loading extra modules or if there's a better way I'm missing. Anyways, it works fine on WebIDE but when I pack it up and install on Lumira Desktop, I get a blank visualization. When I check HTTP traffic with Fiddler, it appears that the require paths are different:
The first line is fine and is just there to show one path example, and the next 2 lines show the incorrect path that my require call is using and 404ing on me.
Is there a way to make this work in WebIDE (which is AWESOME, by the way!) as well as Lumira Desktop without having to toggle paths? I hope I'm just missing something easy.
Thanks for any help!
Hi Michael,
The way I get around the vizpacker and Lumira path issue is to follow the require documented process of adding multiple paths in an array as per the link below. For my extensions this approach works and I don't have to change paths while working with vizpacker or Lumira.
Regards Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, until someone gives me an assist, I have a workaround for now... It's probably still not the right approach so I hope someone can chime in. I am now just using a boolean value that I set to true before Packing to toggle between the two paths. Good enough for now I guess...
Yippe!
Now it's time to pretty it up, etc...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael
I have not had time to look at the extensions at all yet. But I have I did listed to a really good presentation on it, so just throwing this out there as a possible help...
Create Cool SAP Lumira Visualization Extensions with SAP Web IDE - YouTube
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.