Is It possible in JSplumb to change the shape of the link connecting the nodes? - jsplumb

Is It possible in JSplumb to change the shape of the link connecting the nodes ? JSPlumb connects like the red line , while i want the user to change the shape to connect like the green line (sample diagram)
sample diagram

You can do this by changing stokeStyle of connection's paintStyle
You can set it while the connection is created or you can change it later ("Change Color" button on example.).
Here is the example; https://jsfiddle.net/mokarakaya/6yfbm2et/
paintStyle:{lineWidth:3,strokeStyle:"green"}
or;
connection.setPaintStyle({lineWidth:3,strokeStyle:'blue'});

Related

Make all lines to and from to be red when mouse hover on block in jsplumb

In my application we have created flow chart using Jsplumb tool with Ext js 4 and in this I have one requirement that when I will mouse-hover over the block then all lines to and from for that block needs to be turn red .[enter image description here][1]
[1]: https://i.stack.imgur.com/H8Gqy.pngstrong text
I attached image for more specify , here if we click on block B then all lines which is connected to other block needs to be turn red.
Can you please provide me proper solution?

How to change orientation of sketch in CATIA using VB/Knowledgeware?

I am trying to create a knowledge template, such that when I choose a string value from a dropdown list of a multiple value parameter, the reaction fires according to the selection. For example, if I select "no cut", no pocket features are created. (or deleted if they already exist) If I select "top cut", a predefined sketch is used to drive the pocket feature. However, where I'm stuck, is that I want to define a "bottom cut" by changing the orientation of a positioned sketch. I envision it like this:
"bottom cut" selected from drop down list
change sketch support would be initiated
"Reverse V" would be
selected
sketch would be flipped around the xy plane
If "both top and bottom cut" is selected, it would return the sketch to top position (uncheck "Reverse V") and mirror the resultant pocket around XY
I have managed to accomplish everything but the "Reverse V" of "Change Sketch Support". No idea at all what is the best way to accomplish this.
So far, I've created both Knowledgeware actions, and VB actions. Open to any and all suggestions on this one.
Thank you.
Regarding that API for flipping objects orientation are not available, I suggest that you base your sketch orientation on a feature that can be easily flipped:
Create a line based on two "coordinates" points
Use positioned sketch and specify the support plane, the origin point, and orientation for the V direction by using the previously created line
You can now control the points coordinates to change the orientation of the line, and the sketch will follow.
The code will be simple, and the solution is very stable.
Assuming that the reference line is based on two points {0,0,0} and {x,0,0}, the code would be
if TopOrientation
{
GeoSet1\RefPoint\X=1mm
}
else
{
GeoSet1\RefPoint\X=-1mm
}
I hope it will help you.

Amazon EC2 blue box next to "Disabled"

Blue box problem. There is a blue box right next to the label disabled on my Amazon dashboard for EC2 services. The blue box has no tooltip. What is it for? Is it a friend or foe? How did it get there? Do I need it? Will it always stay blue? Can I change its color? Why is it square? How come other don't have a blue box? I don't want a blue box. How do I get rid of it?
The box is a color key for the graphs on the Monitoring tab. If you select mutiple instances, you can view the metrics for multiple instances on the same charts, and the color key tells you which line is which instance.

Persisting x and y coordinates of a kendo diagram

How would kendo diagram shapes x,y coordinates be persisted. I've able to saved it's x,y coords to the database but still the diagram will rearranged the shapes to its default arrangement although it was already set as what I have in the datasource.
Does anyone here knows on what was happening?
I can't say anything certain without seeing your source code but I guess that you have layout option in your diagram configuration which automaticaly rearrange positions of your shapes and connections.
for further information check this:
http://docs.telerik.com/kendo-ui/api/javascript/dataviz/diagram/layout
If you share your code, I can help more.
Kendo diagram picks up the default 'tree down' layout and this overrides the x,y coordinates. To use no layout, you can use:
$("#diagram").kendoDiagram({
.......
layout: false,
.......
});
You can refer to this example: https://jsfiddle.net/xhyyyn35/

Multiple arcs in canvas with click events

Problem :
Trying to create a layout looking like this one below where each portion is clickable and has separate entity.
Tried solution and problems with it :
create arc with canvas. Have to add the arc with stroke. Stroke is not clickable. Tried hacks from other answers but they don't seem to work.
Click Event on a Stroke of the Shape(arc) doesn't work
Instead of drawing with arcs, how about this:
use Wedges instead of Arcs
Draw the 3 outside shapes as Wedges and put them on a layer#1.
Draw the 10 inside shapes as Wedges and put them on another layer#2 above layer#1.
Draw the center circle as a Circle and put it on another layer#3 above layer#1 & layer#2.
Attach on.(“click”) to each individual wedge.
Layering will give you the visual "nesting" effect your looking for.
Layering will give you proper click control over each wedge-piece.

Resources