Posts

Creating connections between Elements in jsPlumb

In my previous posts we've gone through creating a toolbox and canvas from which elements can be dragged from and dropped onto. Then we took a look at eliminating the replication of elements whenever a dropped clone was dragged within the canvas. So now let's move onto creating basic connections between these dropped elements using jsPlumb and jQuery-UI. Starting off with the code previously dealt with, creating connections requires only the addition of a few lines of code to your JS code. The droppable function part of the code has been shown below. Step 1: Assign a unique ID for each element being dropped on the canvas. Though jsPlumb will automatically assign an ID when you don't supply one, it is easier to manipulate the elements when you define an ID. This ID can be a simple digit or even a complex string( But remember, jsPlumb treats all IDs as strings). //Set a unique ID for each dropped Element var indexer = 0 ; function setId (element){ indexer ++; ...

jsPlumb - Drag and Drop Multiple Elements

Hi there, We' ve discussed the jsPlumb facility to Drag and drop objects in my previous post.  Here I've jotted out the way to manipulate the elements dropped onto a canvas without creating replicates of itself. In order to do so, firstly create an additional class definition in your CSS file or simply add the following to the <style> segment in the in the <head> section of your view. . ch { position : absolute ; cursor : pointer ; width : 72 px ; height : 80 px ; background-image : url ( "../dist/img/bigdot.png" ); }   The next and the final step is to squeeze in a few lines of code to your JS file. Within the droppable function, first we create the clone of the tool/ image as discussed in this context, as the 'droppedElement'. Then we add these following lines of code.   Since jsPlumb does not provide support for jQuery, the ui.helper class needs ti be removed. By adding the class "ch" to the drop...

jsPlumb - Dragging a Clone

Image
I've been playing with jsPlumb lately and exploring its features constrained to dragging and dropping objects from a palette onto the canvas. The physical structure of the interface is supposed to have a toolbox( which at present is merely a single image) and a scroll-able canvas onto which the image will be dropped .  Here a user will be permitted to perform multiple drag and drops from the toolbox(image) but the back flow of a dropped element on to the toolbox or outside the canvas is restrained.  Also, the dropped element can be manipulated within the canvas. In this case, starting off with the basics, manipulation of the element deals with only moving the element within the canvas to change its position. But, for further addition of features, manipulation of dropped elements can include re-sizing, adding connectors, property modification via a property console, etc.  The limitation that I came across in this particular piece of code is the self...

Creating the User Dashboard

Identifying the appropriate and necessary requirements that build up the functionalities within the user dashboard was a truly interactive and based on a contextual inquiry session that mimic-ed the system to be developed. Though the user dashboard wasn't considered a necessity at the beginning of the requirements gathering phase, it proved to aid in acting as an intermediary wall between the communication channel of a user and the Event Planning System Staff from the highest to the lowest hierarchy. A registered user is the beneficiary of such a feature. The dashboard will be instantly created for a registered user as soon as hes/ her account is created. A login validation function will ensure the integrity of the access to that particular user's dashboard. The idea to establish this connectivity resulted as the requirement, to keep the client to the website explore options while navigating within the website itself and not having the need to a...

Event Planner Development

For my 3rd year 1st semester at SLIIT, I've been allocated the task of developing an Event Planner for a client according to their requirements. Me and my team mates, have been gathering requirements from the client for 7 days and we've finalized the technological aspects of the system and started implementing the Interfaces. Language: PHP Framework : CodeIgniter Architecture : MVC Database : MySQL IDE : JetBrains PhpStorm CodeIgniter was chosen over Laravel as a result of its desirable feature of having a very small footprint. Also CodeIgniter's set-up and installation procedures seemed to be facile in comparison to that of Laravel's. CodeIgniter also proved to  effortlessly  induce a faster learning curve than that of other frameworks. But, this is merely my personal opinion. Though there are contradictions in the system development world regarding these two, such as, CodeIgniter being outdated and not using the CLI, considering the expendable t...