It is currently Wed Apr 24, 2024 11:18 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #61 Posted: Thu Mar 28, 2013 5:36 am 
Tengen

Posts: 4380
Location: North Carolina
Liked others: 499
Was liked: 733
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
HermanHiddema wrote:
hyperpape wrote:
How long until Herman realizes he's creating an SGF viewer? ;-)


https://github.com/HermanHiddema/sgfparser/tree/v0.1 ;-)
You are replacing so much of the half-finished crap I have on my computer.

_________________
Occupy Babel!

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #62 Posted: Fri Apr 05, 2013 11:58 am 
Gosei
User avatar

Posts: 2011
Location: Groningen, NL
Liked others: 202
Was liked: 1087
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
YAMU! (Yet Another Major Update).

Now with:
- visual coordinates
- edit the board (remove intersections to create holes).
- set starting move number
- follow-up diagrams start at the next move after the highest in the current diagram
- all round improvements to the interface interaction
- labels move up automatically

To change the move number, first move color or first move number, click the move tool again after selecting it for an options drop-down. Same to change the label.

http://hiddema.nl/diagrammer/

Nearing feature completion now. Most important thing to do: initialize from a pasted diagram. Watch this space :)

Oh, and of course bug reports and feature requests are still welcome!

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #63 Posted: Fri Apr 05, 2013 12:07 pm 
Dies with sente
User avatar

Posts: 86
Liked others: 25
Was liked: 19
Rank: -
KGS: Mages
Tygem: Mages
IGS: Mage
Online playing schedule: Weekends.
Woot ! The updates look great !

I was also curious about your "SGFparser". Is it a cross-platform SGF viewer under development ? :)

_________________
Tempus Vincit Omnia

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #64 Posted: Fri Apr 05, 2013 12:27 pm 
Gosei
User avatar

Posts: 2011
Location: Groningen, NL
Liked others: 202
Was liked: 1087
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
Mage wrote:
Woot ! The updates look great !

I was also curious about your "SGFparser". Is it a cross-platform SGF viewer under development ? :)


Well, it isn't really anything yet. I made it because I was thinking about making an SGF viewer/editor, or maybe a game database search tool. I thought I'd start off with an important core component and worry about interface issues later. Maybe something based on Tk, maybe Pygame, maybe something web-based with Django. I don't really have enough time to give a project like that the attention it deserves, but now it might come in handy as a back-end component to the diagram editor to create diagrams from SGF. :)

Anyway, I've just added an MIT license to the SGF parser as well, in case anyone wants to use it to make something cool. :tmbup:

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #65 Posted: Fri Apr 05, 2013 4:19 pm 
Oza
User avatar

Posts: 2401
Location: Tokyo, Japan
Liked others: 2339
Was liked: 1332
Rank: Jp 6 dan
KGS: ez4u
HermanHiddema wrote:
YAMU! (Yet Another Major Update).

Now with:
- visual coordinates
- edit the board (remove intersections to create holes).
- set starting move number
- follow-up diagrams start at the next move after the highest in the current diagram
- all round improvements to the interface interaction
- labels move up automatically

To change the move number, first move color or first move number, click the move tool again after selecting it for an options drop-down. Same to change the label.

http://hiddema.nl/diagrammer/

Nearing feature completion now. Most important thing to do: initialize from a pasted diagram. Watch this space :)

Oh, and of course bug reports and feature requests are still welcome!

It now half-way works on my iPad. Was that deliberate? I can input stones (double tapping for white), numbered stones, markers, and captions. I can not change the color of numbered stones. The drop down menu appears but tapping the change buttons does nothing. The help menu does not appear. What still kills the whole thing is that highlighting the diagram and 'copying' does not, in fact, put anything on the iPad clip board. :scratch:
Attachment:
Herman iPad1.PNG
Herman iPad1.PNG [ 121.55 KiB | Viewed 6956 times ]

_________________
Dave Sigaty
"Short-lived are both the praiser and the praised, and rememberer and the remembered..."
- Marcus Aurelius; Meditations, VIII 21

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #66 Posted: Sat Apr 06, 2013 12:42 am 
Gosei
User avatar

Posts: 2011
Location: Groningen, NL
Liked others: 202
Was liked: 1087
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
ez4u wrote:
It now half-way works on my iPad. Was that deliberate? I can input stones (double tapping for white), numbered stones, markers, and captions. I can not change the color of numbered stones. The drop down menu appears but tapping the change buttons does nothing. The help menu does not appear. What still kills the whole thing is that highlighting the diagram and 'copying' does not, in fact, put anything on the iPad clip board. :scratch:


It was not deliberate, but some of the code clean-up I did may have helped.

I've now added a few additional fixes that may fix the iPad bugs:

1. It seems that adding "cursor:pointer" to elements that are supposed to be clickable helps iOS figure out whether a tap should mean "click" or "hover", so I've liberally sprinkled that on anything that should be clickable.

2. As to the copying, turns out iOS has a known bug where it can't copy from a readonly textarea :scratch: I've added a bit of browser detection to the code that removes the readonly attribute from the textarea under iOS. Downside is that it'll now probably pop up a keyboard when you click the textarea, but we'll call that the lesser of two evils :)

Could you give it a spin and see if it works now?

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #67 Posted: Sat Apr 06, 2013 7:36 am 
Gosei
User avatar

Posts: 2011
Location: Groningen, NL
Liked others: 202
Was liked: 1087
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
I tried it on a friend's iPhone, and there the "Show Help" as well as copying the output did work, so hopefully it'll work on the iPad too now. :)


This post by HermanHiddema was liked by: Bonobo
Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #68 Posted: Sat Apr 06, 2013 8:28 am 
Oza
User avatar

Posts: 2401
Location: Tokyo, Japan
Liked others: 2339
Was liked: 1332
Rank: Jp 6 dan
KGS: ez4u
HermanHiddema wrote:
I tried it on a friend's iPhone, and there the "Show Help" as well as copying the output did work, so hopefully it'll work on the iPad too now. :)

Let's see...

Click Here To Show Diagram Code
[go]$$B Directly generated - Can't change the color...
$$ +---------------------------------------+
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . O . . . . . , . . . . . X . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . T . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . 2 . . |
$$ | . . . . . . . . . . . . . . . 0 . . . |
$$ | . . S , . . . . . , . . . . . 6 1 . . |
$$ | . . . . . . . . . . . . . . 8 7 9 . . |
$$ | . . . C . . . . . . . . . . . 4 5 . . |
$$ | . . . . . . . . . . . . . . . . 3 . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . O . . . . . , . . . . . , X . . |
$$ | . . . . . . . . . . . . . . X . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ +---------------------------------------+[/go]


Click Here To Show Diagram Code
[go]$$W Amending by hand...
$$ +---------------------------------------+
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . O . . . . . , . . . . . X . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . T . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . 2 . . |
$$ | . . . . . . . . . . . . . . . 0 . . . |
$$ | . . S , . . . . . , . . . . . 6 1 . . |
$$ | . . . . . . . . . . . . . . 8 7 9 . . |
$$ | . . . C . . . . . . . . . . . 4 5 . . |
$$ | . . . . . . . . . . . . . . . . 3 . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . O . . . . . , . . . . . , X . . |
$$ | . . . . . . . . . . . . . . X . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ +---------------------------------------+[/go]

The Show Help menu now works. :bow: :clap:

_________________
Dave Sigaty
"Short-lived are both the praiser and the praised, and rememberer and the remembered..."
- Marcus Aurelius; Meditations, VIII 21

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #69 Posted: Sat Apr 06, 2013 9:50 am 
Gosei
User avatar

Posts: 2011
Location: Groningen, NL
Liked others: 202
Was liked: 1087
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
ez4u wrote:
HermanHiddema wrote:
I tried it on a friend's iPhone, and there the "Show Help" as well as copying the output did work, so hopefully it'll work on the iPad too now. :)

Let's see...

Can't change the color...

The Show Help menu now works. :bow: :clap:


Ok, so color change still needs to be fixed.

On the iPhone I managed to change the viewport, but it wasn't very easy. I'll look into improvements on that front.

Also it showed no handles for the viewport, so I still need to look into that.

Anyway, it's come a long way on the iPad, which is good :D

In the future, I hope to dive into tablet support some more. For example, using pinch to resize the viewport would be cool. And there are probably other ways in which I can use the tablet's features better.


This post by HermanHiddema was liked by 2 people: Bonobo, murksomat
Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #70 Posted: Sat Apr 06, 2013 5:12 pm 
Oza
User avatar

Posts: 2401
Location: Tokyo, Japan
Liked others: 2339
Was liked: 1332
Rank: Jp 6 dan
KGS: ez4u
HermanHiddema wrote:
...

On the iPhone I managed to change the viewport, but it wasn't very easy. I'll look into improvements on that front.

Also it showed no handles for the viewport, so I still need to look into that...

Although the handles are invisible, they work...
Click Here To Show Diagram Code
[go]$$B Invisible handles
$$ +--------------------
$$ | . . . . . . . . . .
$$ | . . . . . . . . . .
$$ | . . . . . O . . . .
$$ | . . . X . . . . . ,
$$ | . . . . . . . . . .
$$ | . . X . . . . . . .
$$ | . . . . . . . . . .
$$ | . . . . . . . . . .
$$ | . . . . . . . . . .
$$ | . . . , . . . . . ,[/go]

When you touch and drag the handle, the screen updates more slowly than on a PC with a mouse. However, it functions quite well. Of course the iPad screen is much larger than an iPhone so that may make it easier.

_________________
Dave Sigaty
"Short-lived are both the praiser and the praised, and rememberer and the remembered..."
- Marcus Aurelius; Meditations, VIII 21

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #71 Posted: Tue Jun 18, 2013 2:11 pm 
Lives in sente

Posts: 923
Location: UK
Liked others: 72
Was liked: 479
Rank: 5 dan
KGS: macelee
I am quite impressed by this work. It seems this script is the perfect tool to generate SL diagram code from scratch, while http://senseis.xmp.net/tools/sgf2diagram.php can be used to generate diagrams from existing SGF files.

I am trying to complement these works by allowing diagrams to be generated from professional games hosted at Go4Go.net so that people can discuss pro game positions more easily. This is certainly a function I find very useful.

After some preliminary study, I found that the diagrams can be generated very easily from the server side. This is because I already have existing code to generate the thumbnail board images used throughout the Go4Go site. [edit removed a broken URL]

The next step is to integrate this with the existing page, such as http://www.go4go.net/go/games/sgfview/20081 showing the same game. I have relatively little experience writing client side code using Javascript or JQuery. I wonder if anyone can suggest a good way forward in term of presentation and client-side coding. Maybe it is possible to reuse some code from HermanHiddema's work.


Last edited by macelee on Tue Jan 06, 2015 7:23 am, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #72 Posted: Thu Jul 04, 2013 3:44 am 
Lives in sente

Posts: 923
Location: UK
Liked others: 72
Was liked: 479
Rank: 5 dan
KGS: macelee
Following my previous post and some feedback, I believe after all it is a better idea to generate the diagram code from client side. I have just created a new SGF viewer for Go4Go.net and implemented the "diagram code" in it. See the attached screen captures. I hope this works well and complements the existing works.

[*] Generate diagram from existing SGF files: http://senseis.xmp.net/tools/sgf2diagram.php
[*] Create diagram from scratch (HermanHiddema's work): http://hiddema.nl/diagrammer/
[*] Generate diagram from pro games: http://www.go4go.net (on any game page)

Attachment:
screen1.png
screen1.png [ 138.72 KiB | Viewed 6746 times ]

Attachment:
screen2.png
screen2.png [ 102.75 KiB | Viewed 6746 times ]

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #73 Posted: Thu Jul 04, 2013 7:58 am 
Gosei
User avatar

Posts: 2011
Location: Groningen, NL
Liked others: 202
Was liked: 1087
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
One of the features that is high on my todo list is to accept diagram code as input for editing. Once that is done, you could embed my editor and open the diagram code directly in the editor, allowing people to easily edit it before using it.

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #74 Posted: Thu Jul 04, 2013 8:14 am 
Lives in sente

Posts: 923
Location: UK
Liked others: 72
Was liked: 479
Rank: 5 dan
KGS: macelee
HermanHiddema wrote:
One of the features that is high on my todo list is to accept diagram code as input for editing. Once that is done, you could embed my editor and open the diagram code directly in the editor, allowing people to easily edit it before using it.


Nice. I was about to suggest changing your front page to dynamic, accepting data POSTed to it. The integration should be easy.

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #75 Posted: Thu Jul 04, 2013 12:29 pm 
Oza
User avatar

Posts: 2644
Liked others: 304
Was liked: 631
Rank: kgs 6k
Thanks again to both of you for workking on this. One note about the SL sgf2diagram tool: it only works on 19x19 and puts 9x9 in the top left corner of a 19x19 board. If this is an easy fix, you might want to fix the L19 tool before using it on a permanent basis as part of the diagram tool. Thanks!

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #76 Posted: Thu Jul 04, 2013 5:06 pm 
Oza
User avatar

Posts: 2401
Location: Tokyo, Japan
Liked others: 2339
Was liked: 1332
Rank: Jp 6 dan
KGS: ez4u
macelee wrote:
Following my previous post and some feedback, I believe after all it is a better idea to generate the diagram code from client side. I have just created a new SGF viewer for Go4Go.net and implemented the "diagram code" in it. See the attached screen captures. I hope this works well and complements the existing works.
...
[*] Generate diagram from pro games: http://www.go4go.net (on any game page)

...

This is amazing and works great on my iPad as well. Very well done. Thanks to everyone involved!
:clap: :tmbup: :clap: :tmbup: :clap:
Click Here To Show Diagram Code
[go]$$B Test diagram on iOS
$$ +---------------------------------------+
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . X . . . . . . . X . . O . . |
$$ | . . . O . . O . . , . . . . . X . O . |
$$ | . . . . . . . . . . . . . . . . X O . |
$$ | . . . O . . . . . . . . . . . X O O . |
$$ | . . . . . . . . . . . . . . X O X . . |
$$ | . . . . . . . . . . . . . . . . X . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . 1 . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , X . . |
$$ | . . . O . . . . . . . . . . X . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ +---------------------------------------+[/go]

_________________
Dave Sigaty
"Short-lived are both the praiser and the praised, and rememberer and the remembered..."
- Marcus Aurelius; Meditations, VIII 21

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #77 Posted: Thu Jul 04, 2013 9:55 pm 
Lives with ko
User avatar

Posts: 172
Location: Santa Barbara, CA
Liked others: 235
Was liked: 77
Universal go server handle: fireproof
HermanHiddema wrote:
ez4u wrote:
Still no action on the iPad. The drop-down lists for labels and moves do drop down when touched. However, nothing else on the page reacts, not even the 'show help' tab.


Just to make sure: Did you do a reload on the page? Otherwise it might use a cached version.


It's working very well using Safari on my iPad mini, running iOS 6.1 -- nice job!

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #78 Posted: Thu Jul 04, 2013 10:58 pm 
Oza

Posts: 2356
Location: Ireland
Liked others: 662
Was liked: 442
Universal go server handle: Boidhre
I forgot to say thank you for this. It's extremely helpful as a time saver, excellent work.

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #79 Posted: Sat Aug 17, 2013 8:14 pm 
Lives in sente
User avatar

Posts: 801
Location: Amsterdam (NL)
Liked others: 353
Was liked: 107
Rank: KGS 7 kyu forever
GD Posts: 460
I like your tool very much. Thx! It would be nice if killed stones would be removed automatically in followup diagrams.

_________________
I think I am so I think I am.

Top
 Profile  
 
Offline
 Post subject: Re: HTML+JavaScript diagram builder
Post #80 Posted: Thu Aug 22, 2013 3:30 am 
Gosei
User avatar

Posts: 2011
Location: Groningen, NL
Liked others: 202
Was liked: 1087
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
cyclops wrote:
I like your tool very much. Thx! It would be nice if killed stones would be removed automatically in followup diagrams.


I've been thinking about this, but it isn't easy. From an SGF it is easy, but in diagrams there may be captures that are in the comments (e.g.: :w7: retakes ko) or intersections that have since been filled (e.g. :w5: connects).

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group