Giter Site home page Giter Site logo

Comments (7)

LocutusOfPenguin avatar LocutusOfPenguin commented on July 29, 2024

Also in yr file pgnvjs.js i think there is an error at line 467 .. It should be:

moveSpan(currentCounter).on('click', function(evt) { makeMove(that.currentMove, currentCounter, move.fen); evt.stopPropagation(); });

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

Just to be sure that I understand your problem (clicking on variation) correct. I do the following:

I had no problems at all. How can I get your result? I am using a current Chrome browser. Tried some different browsers, no change.

from pgn-viewer.

LocutusOfPenguin avatar LocutusOfPenguin commented on July 29, 2024

Hallo,

on chrome Version 51.0.2704.79 Ubuntu 16.04 (64-bit) it is working.
on firefox (47.0 also Ubuntu) its not

On FF, it always shows the var very shortly and then return to the last move of main line (=before the var >> for example clicking on sxe4 showing the correct diagram and instantly returning to e4e5 pos).

Agree with my last posting (JS-error)?

I guess it has to do with my posting cause when i click on such var, i get this error:

ReferenceError: event is not defined
event.stopPropagation();

therefore my fix

Jürgen

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

I could reproduce your problem with Firefox as well. The fix I found (sorry, no chance to make a quick fix) is the following:

  moveSpan(currentCounter).on('click', function(event) {
      makeMove(that.currentMove, currentCounter, move.fen);
      event.stopPropagation();
  });

So by adding the event parameter explicitly, Firefox now behaves as Chrome. So I hope you can introduce that into the distro yourself, I have no time at the moment to do a release, and a lot of changes in my current version.

Thank's a lot for reporting that error, I will try to fix it in the next weeks to come.

from pgn-viewer.

LocutusOfPenguin avatar LocutusOfPenguin commented on July 29, 2024

Well, that what i posted already (see second post).
For me, this (our) fix solved the problem!

I found this project cause i'm looking for an alternative to the current (with flaws) webserver implementation to the project http://github.com/jromang/picochess.
But im still not sure, cause i have something similar as #19 .. Moves are made in backend, and needs to be reflected in frontend (=not a ended pgn-file). We have two use-cases. 1) Show finished pgn-files and 2) Show the ongoing game (for this im not sure as said above) and this is the main use for picochess webserver.
In this light i hope y can include this fix and the many other improvements in yr pipeline quickly :-)

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

Thanks for the correction, I didn't see the additional argument in your first hint. I will try to come with a solution for #19 that allows to play games by the interface. See my comment there ...

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

Closed with the newest release

from pgn-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.