rikukissa / node-red-contrib-image-output

🏞 Easy way of previewing and examining images in your flows
MIT License
13 stars 6 forks source link

Possible to add ability to close preview ? #12

Closed dceejay closed 5 years ago

dceejay commented 5 years ago

Hi,

would it be possible to close the image preview on click so that the preview can be closed to clear up the desktop ?

Also... being a picky so and so .... (and do feel free to say no...:-)... would it be possible to a) move the image slightly right so the left edge lines up... - I have tried it with

  const left = imgBbox.x
  const top = imgBbox.y
  const right = imgBbox.x + imgBbox.width
  const bottom = imgBbox.y + imgBbox.height
  const points = left + "," + top + " " +
    (left + 35) + "," + top + " " +
    (left + 40) + "," + (top - 10) + " " +
    (left + 45) + "," + top + " " +
    right + "," + top + " " +
    right + "," + bottom + " " +
    left + "," + bottom

and then b) set the default width to 140px and so it all lines up by default :-)....

and then c) in the js file added

  if (msg.hasOwnProperty("filename")) {
    node.status({text:msg.filename});
 }

So if it comes direct from a file node you see the name as well :-)...

Finally I do wonder if Image preview is a better name ? (bit late now... but I guess the labels could change if not the name underneath (as that would break people)

Many thanks

Happy to raise a PR for this if you like.

rikukissa commented 5 years ago

Hey @dceejay thanks for your comments! I agree with all of your points and would be happy to get this changes in as a PR. I haven't been working on node-red myself for a while and would also be willing to transfer ownership to this project to you, if you're interested in maintaining it. What do you think?

dceejay commented 5 years ago

Sure - happy to.

rikukissa commented 5 years ago

Alright, you're now a contributor both in this Github repo and in the NPM project :)