JsPlumb doesn't make connections when using non-default instance - javascript

I'm going to use separate instances of jsPlumb for each canvas.
I'm using new features like Continious anchors and StateMachine connectors.
But I face the following issues:
First of all, I initiate new instances with specific defaults, and do not see them being applied.
Secondary, the connection is not established on drop. I thought scope is the reason of an issues, but no.
Here is an example http://jsfiddle.net/CjBdX/34/, where you can reproduce issues stated above. (Please click initiate anchor before using demo) When using only one _default jsPlumbInstance, everything seems to work fine.
Please help me find a reason this code does not work.
Thank you very much in advance!

Thanks to project author, Simon Porritt, all bugs wich led to my issues are now fixed in the latest version.
Thank you very much!

Related

My bootstrap carousel is not working properly in react

I don't know why my carousel's not working properly, can anybody tell me how to fix this issue.
My codesandbox link :- https://codesandbox.io/s/nice-heyrovsky-8yucf?file=/src/Prompts.jsx
You are creating carousel-inner multiple times but in reality you only need to render that one time and render carousel-items multiple times
I refactored your code a bit too so it only talks to the relevant dom elements
Also, I somewhat agree and disagree with christ here. Yes you should opt for react-boostrap library for this kind of stuff because they provide components for every item however if you ever use it then do explore the rendered version of it on the browser and then you will realize that its the same as a simple bootstrap library with same class names etc. But its mostly depends on how you use any library.
Anyway, I hope this codesandbox helped you if didn't then let me know. Happy coding
https://codesandbox.io/s/suspicious-tu-55u2h?file=/src/Prompts.jsx

js-graph.it: How to add Blocks dynamically and build the connections using the Connectors

I am using the js-graph.it based on the documentation provided here and the JS/CSS sample provided here. I am using jQuery to create the Blocks and Connectors dynamically. But for some reason, I am unable to create the Blocks and Connectors. Can someone please help me with how to achieve this?
I added my code sample in jsFiddle here.
I am hoping to create something like this:
Posting the answer as it can be helpful to someone in the future:
I tried a lot of libraries such as Konva, jsPlumb Community Edition, Flowchart-vue, Vue-konva, BPMN but for some reason, none worked the way I wanted it for my application.
Finally, I found an awesome Drawflow library that can be used to draw Nodes and Connections. Its author is very active in the Github so I used that and everything is working fine.

Ctrl+Click on a function name in Atom editor and jump into it

I've been trying to think of a better way to title this question, but unfortunately I have no idea how to explain it. Also I haven't found this on stack overflow (for the same reason stated above).
In Eclipse, I used to Ctrl+Click in the name of a method call (in java). And my cursor would jump in to the definition of my method function.
Question 1: Does anyone know the name of this behavior? I mean, maybe it's called function jumping or something like that.
Also I was searching for a plugin like this in Atom editor. Because I've tried to use this a lot of times (bad habits) and didn't work.
Question 2: Name of the plugin to do this in Atom?
Don't know if it helps, but I'm coding in JavaScript at the moment in Atom editor.
As the other answer noted, alt-click over a method/function name can jump you directly to where it was originally defined. It works within the same file, but it doesn't seem to work across files.
The closest Atom editor package I've found for javascript which allows you to jump to function/method definitions across files is called TernJS.
Once installed, you can use ctrl-shift-r over the word (function/method, variable etc) to bring up a list of where that method/function is defined (includes line # & filepath). You can then click on the list item & it will jump you to the definition.
Here is a video I made containing an example of using this atom package.
http://www.youtube.com/watch?v=cFAzqvYoHJs&t=11m58s
To answer your first question this 'behavior' is knows as 'go to definition', or 'jump to definition'.
To answer your second question some packages you could perhaps take a look at would be,
'goto-definition'
'code-peek'
I find these help a bit but still don't achieve the standards that I would fully like. I wanted something similar to the Intellij IDEA ctrl + click.
I find myself using the ctrl + shift + f to search the entire project for the related files of the thing I'm searching for. Then I find the particular file i'm looking for and shazam! I've got what I came to get. This particular method works best for me.
I know its not exactly what your looking for but this is the best thing I've found so far to achieve something similar to what we both seem to be looking for. Hope this helps a bit,
happy coding...
Currently this behavior is blocked by multiple cursors feature.
The closest you can get is "ctrl-alt-shift-d" + atom-ternjs
try atom/navigate
Link to Atom Navigate
It helps you to do this excact thing.
The only thing is that it's default key is f2 instead of cltr+click
But this is also editable in the package settings in de .atom file
I don't think I have a package for that.
Simply ctrl-D goes to definition for me.
Tried by luck after reading here other methods.
Cheers.
In Atom (1.57.0 version, os Ubuntu 18.04) command ctrl+shift+f is doing project-find:show. (try cmd+shift+f if on mac and the above does not work)
First select a function name in a file within a project, click ctrl+shift+f, and a list of files from your project folder, that also have this function (either defined, or used) should appear.
Click on any of these files, to come back to the list use ctrl+tab. I can see in key-bindings that this command project-find:show, is bound to ctrl+shift+f, and I have used it, but I am not sure if this is from one of the packages, or not. (sorry new to atom)

Possible to have both Probe and Zoom functions working in iScroll simultaneously?

iscroll-probe.js is handling some precise scroll-position functionality on my site. But zoom is not available. If I use iscroll-zoom.js instead, the zoom works, but now my probe function doesn't work. It seems I can have one or the other, but not both.
iscroll-probe.js and iscroll-zoom.js seem to be variations on the standard iscroll.js, each adding different features, but no way to have both at the same time. Unless I start hacking into the Javascript myself, of course, and building some kind of hybrid version.
Do I have this right, or is there a workaround to this?
I've had the same problem. I used git to solve it. I created one branch where I replaced all code from iscroll.js with iscroll-probe.js and another one where I replaced all code with iscroll-zoom.js then I merged both into my master and resolved some conflicts by hand.
Not the best solution but it worked.
You can use requirejs. See following example:
require(['iscroll-probe'], function(iscroll_probe) {
window.IScroll = iscroll_probe;
require(['iscroll-zoom'], function(iscroll_zoom) {
window.IScrollZoom = iscroll_zoom;
});
});

red free support for images

I am working on a web application for a opthology research firm. They work on cornea images and use red free light to identify lesions (artries and nerve fibers) easily. I have implemented the addAmbient() method provided by microsoft for this purpose and it is working fine.
<img id="eyepic" src="GetImage.jsp" height="1291" width="1944" STYLE="filter:light" onload="eyepic.filters.light.addAmbient(0,255,255,100)">
But the problem is this thing works only in IE. I am looking for a method to implement this for other browsers too. If anyone has any idea please help me.
Thanks
hey everyone thanks for responding.Actually i slved my problem a month ago,just forgot to update it here.I am now using java2D api for creating redfree images.It has BandCombineOp to manipulate pixels.
Thanks anyway

Categories