Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-02-2013, 07:19 PM   PM User | #31
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Again, as I said before, I would *NOT* count on making double click work on all devices. I think it makes more sense to distinguish between click and move in other ways.

The easiest of all is to make it context sensitive: For example, have it mean move, say, only when the TAB for MOVE is being displayed. Otherwise it means click.

Granted it's a bit more constrained, but I think it will work across a wider range of devices and it's really pretty intuitive. You *DO* have the "MOVE" icon (the crossed arrows) as one of your tab controls already, so why not use it? Only if that icon/tab is active will drag/move be activated.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 01-02-2013, 07:23 PM   PM User | #32
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
This application I am building is part of a new upcoming help/reference/tutorial website I have been trying to set up for sometime now. The website it is being set up for is an on-line game. This part of the game is open during Halloween.

Usually the user can only see a 6x11 Map at a singular time. I have gone through the entire Hallow Town and got the map so they can know where everything is, zoom out to view a larger map or see it at the normal view size.

This version of Hallow town as been available for, I think either 3 or 4 years now. Each year there are more missions to complete. If they have set settings to show the mission points on the map shown, they'll be able to go through and see the missions and gain help and know where exactly they need to go on certain tiles and whatnot. There'll be a checklist whereas if they've done the mission, they check it and it turns green. If they click on a mission then chec one of the tasks inside the mission, then that one will show up as orange. All unstarted missions will show up as red.

There are also hotspots for finding checks and being able to unlock them. These will be another feature they are able to disable, for those who do not want to see any spoilers so to speak.

On the actually games Hallow Town, there is a chat as well, this is shown where I have the tabs content and the users are shown where my tab menu is, however this is unique per tile, of which I think is stupid and hope to either have a chat elsewhere on the page or one under a tab for anyone on the website to talk about the Halloween event.

This will also be used as a template for the Christmas Town event they have as well.
MrTIMarshall is offline   Reply With Quote
Old 01-02-2013, 07:27 PM   PM User | #33
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Quote:
Originally Posted by Old Pedant View Post
Again, as I said before, I would *NOT* count on making double click work on all devices. I think it makes more sense to distinguish between click and move in other ways.

The easiest of all is to make it context sensitive: For example, have it mean move, say, only when the TAB for MOVE is being displayed. Otherwise it means click.

Granted it's a bit more constrained, but I think it will work across a wider range of devices and it's really pretty intuitive. You *DO* have the "MOVE" icon (the crossed arrows) as one of your tab controls already, so why not use it? Only if that icon/tab is active will drag/move be activated.
I personally believe this seems awkward. Maybe if they had to click a button which changed to an active button to click and drag the map and unclick it for other reasons but I personally just don't like the idea.

I'm not sure what Google Maps are programmed in, but they have a right click feature, can this be done in Javascript?
MrTIMarshall is offline   Reply With Quote
Old 01-02-2013, 08:16 PM   PM User | #34
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 454 Times in 452 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
you hijack the click event

https://developer.mozilla.org/en-US/....oncontextmenu

then add you own functionality
xelawho is offline   Reply With Quote
Old 01-02-2013, 08:18 PM   PM User | #35
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Sure, right click is easy. And Google maps are in JavaScript, what a huge surprise.

But, just for example, I don't think there is any right click on an iPad or iPhone. And I know there isn't one on a Nook.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 01-02-2013, 08:29 PM   PM User | #36
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Quote:
Originally Posted by Old Pedant View Post
Sure, right click is easy. And Google maps are in JavaScript, what a huge surprise.

But, just for example, I don't think there is any right click on an iPad or iPhone. And I know there isn't one on a Nook.
You also cannot click and drag on these devices, therefore they can use the move tab. There'll also be a tab for setting markers and doing the same options, just more easier if your using a computer with a mouse...
MrTIMarshall is offline   Reply With Quote
Old 01-02-2013, 09:35 PM   PM User | #37
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Ummm...I click and drag on the Nook all the time. And my grandson drags and click on his iPad all the time.

Try playing Angry Birds without drag, for example. And a tap on the screen is interpreted as a mouse click.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 01-03-2013, 06:38 AM   PM User | #38
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Oh I did not know. I cannot use technology such as touch screen mobiles and whatnot as I'm registered blind and need a magnification on my system of x500+ magnification enabled

I know this does complicate things for the user, but I did find this for the iPad...
Quote:
If you purchase the ipad app VNC Viewer, by Real VNC, when you tap at the top of the screen, instead of choosing keyboard, choose mouse, then at the bottom right of the screen, you will have a left and right
mouse button you can use. By the way, if you hold the left mouse button and move your other finger, you can use the "drag and drop" or resize windows if you want.
How does Google Maps work on those devices with having a right-click feture?
MrTIMarshall is offline   Reply With Quote
Old 01-03-2013, 04:56 PM   PM User | #39
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Are the forums broke? It says I was not the last to post on this thread, however I can only see my post as being the last one on the thread and when I went back to the board, my thread was still showing in bold...

Edit: Adding this post looks like it resolved things...
MrTIMarshall is offline   Reply With Quote
Old 01-03-2013, 07:54 PM   PM User | #40
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
When somebody SPAMs a thread, they will show as last post, even if their post is removed, until some scheduled refresh cleans up the list of last posts. In other words, the forum CACHES the "last post" information, probably in a separate DB table, and then has to go and clean up the table when posts are removed.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 01-03-2013, 08:07 PM   PM User | #41
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Dunno how Google Maps works with right click on iPad, if at all. On the Nook, the only way to shrink or grow the map is to use +/- buttons, due to the lack of a mouse wheel. (Poor interface design...PINCH and UNPINCH work in other apps to change the magnification. I'm guessing that Google just doesn't see the Nook as a big enough market to build a version just for it.)
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 01-03-2013, 08:17 PM   PM User | #42
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
I'm going to work on the tabs for now, how can I show this image;

https://tornhq.com/images/Events/Hal...wobjective.png

On certain tiles and hide it?

Basically there'll be a check list and if it's checked it won't show, but if it's defaulted unchecked, it'll show...

If you can just tell me once if it's simple enough, hopefully I can do it for the rest...
MrTIMarshall is offline   Reply With Quote
Old 01-03-2013, 08:56 PM   PM User | #43
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
How will the code know *which* tiles to put that on?

Will you have an array of coordinates where it goes?

Example:
Code:
    var showIconAt = [ "3:17","4:22","17:8" ];
Or what?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 01-03-2013, 09:14 PM   PM User | #44
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
To be honest, I don't have a clue. Is there a way to give certain tiles ID names or whatnot?

I need to be able to mark these quest starter points and a here marker but I'm going to be working on the quests, sorting out the listing first and showing them on the map and making the settings tab to be able to disable them all trying to put a bit of Javascript practice to use...
MrTIMarshall is offline   Reply With Quote
Old 01-03-2013, 09:56 PM   PM User | #45
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Well, you can't use IDs, because you are using those for coordinates.

And in any case if you use that map generator based on the letters, as you are doing now, how would you piggyback an indicator on top of one of the letters?

Honestly, likely the best way is exactly as I described in post #43. Put them in a separate array, like that, using their coordinates. Is that viable for you??
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:00 PM.


Advertisement
Log in to turn off these ads.