Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Select multiple points on an image

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176470 by Joffm
Replied by Joffm on topic Select multiple points on an image
Hi,
the provided solution works like a charm.

BUT: In a new survey the client would like to see markers in two different colors (e.g. green, red) to be able to mark positive points and negative points.
Something like: left click: green, right click: red.

And furthermore there should be a comment field for each marker. where the respondent explains why he selected this part (positive resp. negative)

Well, because Tony provided this solution this post is more or less addressed to him.


I attach a screenshot of a solution of IFAD CIS.
www.ifad.de/software/befragungssoftware-cis/?lang=en www.ifad.de/software/befragungssoftware-cis/?lang=en

In my case the comment field can be below., but the important thing is that the respondent can see the connection between marker and field.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176504 by tpartner
Replied by tpartner on topic Select multiple points on an image
Hmm...that'll take some time to develop.

It's interesting that the linked example doesn't work on smartphones. Do you need it to be mobile-compatible? If so (and maybe regardless of that), I would suggest dragging into position instead of clicking - the right-click (tap and hold) on phones is not intuitive to many.

Regarding the comments, can you get away with a single-line input (<input type="text">)?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176580 by Joffm
Replied by Joffm on topic Select multiple points on an image
Hi,

some feedback:

Yes, you are right about smartphones: The developers of the example say "It doesn't make sense on smartphones".

So, if you have any ideas you are absolutely free in design.

The need (the wishes) are:
  • two different markers (positive vs. negative)
  • comments related to each marker
  • if I remove a marker the comment is removed as well
  • Single line for comments is fine.
  • Doesn't matter where the comment is displayed. Can be below the picture.
  • smartphone not absolutely required.

The "nice to have" are:
  • Multiline comment
  • smartphone enabled


Thank you in advance

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176590 by tpartner
Replied by tpartner on topic Select multiple points on an image
My thinking on the single-line input is that we could use a multiple-short-text question for the good/bad values, the coordinates and the comments. That way we could roll it into a custom question theme containing all necessary scripts and styles.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176634 by Joffm
Replied by Joffm on topic Select multiple points on an image
Hi, Tony,

sounds good.

Are you able to do it? Unfortunately I am not.
I am good at many things, but neither familiar with JS nor with the custom question themes (which I hope to learn some day).

Kind regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176667 by tpartner
Replied by tpartner on topic Select multiple points on an image
Yes, I can probably do that but it will take some time.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago - 5 years 5 months ago #176976 by tpartner
Replied by tpartner on topic Select multiple points on an image
@Joffm, have a look at this custom question theme and let me know if you want any other features - github.com/tpartner/LimeSurvey-Image-Interest-Points-3.x

(it is mobile capable)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 5 months ago by tpartner.
The following user(s) said Thank You: DenisChenu, holch, Joffm
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176994 by Joffm
Replied by Joffm on topic Select multiple points on an image
Hi, Tony,
this is absolutely breathtaking.

I do not know what to say.

Many thanks.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176995 by holch
Replied by holch on topic Select multiple points on an image

this is absolutely breathtaking.


There, you said it... ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #177013 by Joffm
Replied by Joffm on topic Select multiple points on an image
Hi,

testing this I found two not really important things.
Here the maximum number of markers is 5.

1. After I dragged 5 positive markers, there are no more (obvious because only 5 are created and parked.)
And the negative marker is disabled, but not visible; there is still the active color (but my glasses get worse).

But after removing one positive marker the negative stays disabled.


2. After placing 5 markers (pos. and neg.) the still parked markers are disabled (as you would expect)

But after removing one marker only the parked marker of this "value" (pos. resp. neg.) is enabled again. The other stays disabled.


As I said: Minor issues.

I am so happy that we have somebody here who fulfills nearly every wish.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #177021 by tpartner
Replied by tpartner on topic Select multiple points on an image
Thanks for testing.

Regarding the parked markers not being re-enabled, here is a fix - github.com/tpartner/LimeSurvey-Image-Int...bfc0b33eb9f2bd67444d

Regarding the appearance of disabled markers, in interestPoints.css (line 74), you could change this:
Code:
.interest-points-outer-wrapper .disabled-marker {
  opacity:0.20;
  filter:alpha(opacity=20);
  cursor: default;
}

To this:
Code:
.interest-points-outer-wrapper .disabled-marker {
  opacity:0.20;
  filter:alpha(opacity=20);
  cursor: default;
  background-color: #999999 !important;
}


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 2 weeks ago #183154 by pixelT
Replied by pixelT on topic Select multiple points on an image
Hey, sorry to open this topic again, but I thought it would make more sense to continue here than to create a new topic.

First of all, thank you for making this project it really helped me creating mine!!

I have just come to one problem/question: I don't know how the vectores are saved.
I tried to understand the code but I couldn't figure it out.

To explain it bit deeper:
In my project I would need to know the order of the placed markers- like which was the first one placed, the second one,...the last one.

I tried many examples to figure out the algorithm behind it but I didn't succeed.
with 2 markers placed, the order is right. but When you place more than 2 markers the order of them completely changes.

Maybe somebody could help me understand how they are saved?

Thank you in advance and have a nice day :)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose