Cytoscape graph builder (drag-and-drop new nodes) - cytoscape.js

I am looking to use Cytoscape.js to build an interactive web based graph builder. Is it possible to handle a drop event to create a new node or link? If not, what options, if any exist for interactive graph building using the API? It looks like I may be able to use the click event or the radial menu plugin to do something like this but I'm interested in other options. Are there any good examples out there of doing something like this?

Cytoscape.js has an extension API that can be used to create reusable components like you suggest. There are several existing extensions which you can use in addition to the documentation as examples.
It seems someone has made a similar extension, but it’s straightfoward to create your own using any of the documented API functions.
We’re working to streamline the extension writing and submission process so it’s easier to share your extensions with others in v2.3.

Related

Is there any extension example on implementing property editor in vscode?

I have been searching thru the documents and tutorials looking for api / extension examples to implement a GUI like the screenshoot above.
Is there any existing api to implement property editor? or do i need to implement GUI from scratch?
No, there's not. You can implement an own GUI via webviews, but that's about it.

How to generate and scan barcodes with aurelia?

I have a webpage that needs to be able to generate and later read barcodes. But i cannot seem to find any small scale addon to aurelia that does even one of these. Is there any libary that does this or do i have to write my own somehow? Or can i somehow use some preexisting barcode stuff that is not directly designed for aurelia?
looks like you have to find a suitable library for the task on npm.
For barcode generation, you can use this test app:
https://codesandbox.io/embed/barcodes-bxgf1
Be sure to adapt to your own bundling choice.
I used quaggaJS in my aurelia app for reading existing bar codes.
(it's actually just a regular JS package - not specially for aurelia)
the API is kind of old (callbacks instead of promises), and overall it's a little weird (the Initialization process), but in the end it works great with little effort.
you can use https://www.npmjs.com/package/qr-scanner only draw back is that your website need to be https.

Sitefinity 4+ -- Standardizing intra-site modules in Sitefinity 4-5.x

We write a lot of intrasite modules and are noticing that they really deviate now in SF 4+ from the content-based ones. So, on that note, I have some questions:
How do you get the EXACT look and feel of the standard modules for the edit/create form? For example, how do you eliminate the menu above, center the form, etc, as in, say, the Events module?
How do you add an actions menu dropdown to a radgrid, same as you'd see in the grids for standard modules?
How do you incorporate Sitefinity fields into the usercontrols? For example sf:ImageField throws script errors when added to a control? Also, is there documentation on each of these fields and how to configure?
---finally---
If we really want that standardization, do we have to go with another module type?
4.Is there a module type that will allow us to access non-sitefinity data (ie separaate db
but also provide us with exactly the same functionality and UI experience as the content-
based modules?
intra site modules are simply custom user controls (ascx) placed into backend pages to add your custom functionality to the backend. To copy the look and feel of the rest of the site, I literally copy and paste the HTML into the control.
I did a webinar on this a while back, including code to recreate the backend editor. It appears to still be valid, and is available here: http://www.sitefinity.com/blogs/joshmorales/posts/josh-morales-blog/2011/06/30/sitefinity_intra-site_module_webinar_notes
the centered view is a bit different, and I don't have that html, but you could potentially do the same (copy it from another native page). I don't always get it 100% accurate (my controls are usually laid out different from what Sitefinity does) but I get close enough so that it doesn't break the user experience.
The actions menu could be recreated with javascript, but if you are looking for NATIVE integration that does all this for you, indeed you would be looking at inheriting or much better yet: simply using the module builder, which lets you build custom types that automatically install themselves into Sitefinity as if they were regular modules.
Fields are definitely designed to run inside the context of native sitefinity module definitions (the classes that make up the UI using the Sitefinity context). This doesn't mean you can't include Sitefinity content in your modules; it simply means if you do you'll have to implement the integration yourself using the API.
On your last question, the only way to use external data but still keep the "Sitefinity Content" UI is to inherit from Content, then create a custom provider that reads from your database and translates it into the Sitefinity content type. It is certainly possible, but is quite a big project.
Unless you are in full need of this tight integration, I recommend simply going intra-site, linking to Sitefinity content types,taxonomy, etc through the API and manage it separately.
I hope this was helpful!

using dojox.mobile and dijit together

We are trying to make an app maker with dijit. Do you know what to do more or less to have the dojox.mobile.* branch running parallel to my dijit app ?
I know there is a seperate dojox.mobile.parser,... I guess, I need to fork it quite deep ?
I thought first about an iFrame but we need drag'n drop from the designer and the simulator.
Any help is welcome,
g
dojox.mobile offers a very light-weight parser which can be used in place of the standard dojo.parser. I think it skips stuff like attachpoints and probably wouldn't work too well with Dijit, so if you use both types of widgets on your page, stick with dojo.parser. The parsers share some globals and are unable to co-exist, so do NOT load both.

Maya API - Create plugin to import various Models

I am trying to create a plugin in Maya API that will basically have a menu inside of Maya and I will be able to load in a different character head depending on which button was pressed.
This is my first time with the Maya API so I am quite unfamiliar.
Any ideas on how to import models like this using the API?
Thanks so much!
Tyler
I recommend using MEL as a start, instead of the Maya API.
MEL Commands you should look at are file to import files into your scene (e.g. heads), and probably all UI related commands to create a simple window.
As Byron mentioned, MEL or Python scripting would be a (dramatically) simpler solution than using the API. There is one key difference between what you will be able to accomplish using the API compared to a script:
Using the OpenMayaUI modules, you can insert your "head selection UI" directly into the existing menus in Maya.
Using a script, you are restricted to a floating ui window that can be docked in certain places in Maya's UI (This is not technically true, however it is far easier to utilize scripts in this manner rather than trying to force your script into the UI). Furthermore, creating a button for the script to be launched in Maya requires users of the script to take an extra step. It cannot be "installed" into Maya for them (Again, not technically true, but most users prefer shelf buttons as opposed to menus in the UI). See Autodesk Documentation: Creating a shelf button for a script for more information on that.
I see no reason that a script will not suffice for a simple head swap action, but if you wish to use this as an exercise in learning the API then I can give you a few pointers:
First of all, all non-API Maya commands can be accessed in both a script and using the API for a plugin. Since this "Plugin" does not require any API modules other than those needed for adding the Plugin directly to the UI, you can mockup the entire functionality using a script.
In other words, you can use "import maya.cmds as cmds" in both a script and a plugin, and the actual functionality you desire is available entirely using that module. Therefore, I would advise you make a script that performs the actions you want first, then work on converting that script into a plugin. Creating a command plugin that achieves this result should be fairly simple once you already have a script that works. Then, all you need to do is use the UI API modules to add your menu to the existing Maya UI.
Once your script is complete, here is a link to Autodesk's tutorial on creating a command plugin: Autodesk Python API Documentation
And this cgsociety discussion contains a lot of useful tips of getting your UI inside of Maya's (the discussion is about c++, but the same concepts apply to python plugins): C++ Add Menu to Maya's Main Menu Bar
I've taken to assuming this will all be done using Python, since scripts and plugins can both be programmed in that language. It's also what I use- I've never delved into the c++ API. Anyways, I hope this helps! Good luck :)