Git Product home page Git Product logo

Comments (6)

shaack avatar shaack commented on June 9, 2024

First, did you read the documentation about „Create your own custom markers“? And these examples https://shaack.com/projekte/cm-chessboard/examples/input-callbacks.html

from cm-chessboard.

vesper8 avatar vesper8 commented on June 9, 2024

highlighting previous moves.

@xFighter1209 Did you ever figure this out? Can you share some code please? Thanks

from cm-chessboard.

shaack avatar shaack commented on June 9, 2024

This is done in chess-console, which uses cm-chessboard. https://github.com/shaack/chess-console
Example: https://shaack.com/projekte/chess-console/examples/play-both-local.html

from cm-chessboard.

vesper8 avatar vesper8 commented on June 9, 2024

@shaack Thank you

I also found this older example that does this and more https://codesandbox.io/s/fwmc8?file=/src/chessboard.js

I get the sense though that ever since you added the new marker system, it's no longer so easy to set the background colour of squares?

If you see here: https://codesandbox.io/s/fwmc8?file=/src/chessboard.js:1562-1612

It used to be very straight forward to set the background color of any square.

Is that still possible now? If I don't want to add a marker per se (a shape) but just want to set or toggle the background color of a square. Can I do that without first creating a custom marker and creating a class? Is it possible to just do it inline like in the above example?

Many thanks

from cm-chessboard.

djeetee avatar djeetee commented on June 9, 2024

is https://shaack.com/projekte/cm-chessboard/examples/input-callbacks.html available? it's not in the examples (or is it?)

thanks

from cm-chessboard.

shaack avatar shaack commented on June 9, 2024

I think this was moved to
https://shaack.com/projekte/cm-chessboard/examples/extensions/markers-extension.html or
https://shaack.com/projekte/cm-chessboard/examples/validate-moves.html

from cm-chessboard.

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.