howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
425 stars 94 forks source link

Editor datapicker - show the name/description of the link or node #99

Closed ok1ean closed 6 years ago

ok1ean commented 7 years ago

Can you make a small upgrade in one of the files? The /editor-resources/editor.js file has a function that opens a new browser window: function openpicker(url). I think that it would be more convenient for many people to open this window not in the left-upper corner, as now, because now it overlaps the "Properties" window. Make the call to the window.open function as in the text below (offset as an example) or open in the center of the screen.

function openpicker(url) {
    // make sure it isn't already opened
    if (!newWindow || newWindow.closed) {
        newWindow = window.open("", "cactipicker", "left=300,top=300,scrollbars=1,status=1,height=400,width=400,resizable=1");
    }
howardjones commented 7 years ago

1) Surely this depends on where you browser window is? 2) Why do you need to see both the properties and picker? The plan for the future is that the picker won't be a separate window at all... is there something I'm missing here?

ok1ean commented 7 years ago
  1. IE, Crome and Opera - in these browsers, with this modification, the windows open equally.
  2. In the properties window we see (e.g. Link from 'Device1' to 'Device2') where we need to take the data source for the graph so that the values and direction on the arrows are correct. With a large number of devices in the picker list you have to choose the right one for a long time.

Are there any plans for the future to return the list of the latest selected devices? Or add an option filter devices based on the node name?

howardjones commented 7 years ago

74 and #54 are for restoring the features.

So really, if the picker window showed which item we're talking about, that would also work, and not require anyone to ever move a window.

ok1ean commented 7 years ago

Yes, if in the picker window will indicate the object to which we select the data source (node names or their labels), it will simplify the work.

howardjones commented 7 years ago

OK - should be simple enough to add in :-) I'm reopening this so it reminds me.