Comments (3)
FYI - Issue #113 has a neat solution for this using a data-uri
from chessboardjs.
Hello! I code this cache method in the library and the difference is really really great! no more flicker on pieces.
Now I have a question: I must do a pull request with the modification? (Really the work and the idea is from @Zolmeister )
Note: Thanks @Zolmeister !
from chessboardjs.
I confirm that this works. A note to anyone trying this -- to get it working, I had to create imgCache and call cacheImages() at the top of the Window init as follows:
window['ChessBoard'] = window['ChessBoard'] || function (containerElOrId, cfg)
{
'use strict';
var imgCache = {};
cacheImages ();
I put the rest of the code near buildPieceImgSrc() per Zolmeister's helpful instructions.
from chessboardjs.
Related Issues (20)
- Export board to an image (png or jpeg) HOT 2
- about onDragStart HOT 1
- about addArrowAnnotation HOT 4
- How to import chessboard.js in Vue App HOT 4
- Pawn Promotions not Updating Board HOT 1
- 1px gap between the border and the squares
- Guide to implement / use it in React HOT 1
- Publish chess piece images to CDN HOT 1
- Temporarily duplicated pieces due to racing updates to currentPosition. HOT 2
- Board without pieces HOT 2
- Move chess piece off the board HOT 2
- dependencies issue
- Castling does not move the Rook, just the King.
- Chessboard doesn't fit container completely HOT 1
- minor bug in documentation
- onMoveEnd/onChange and onDrop different output
- lacuna in documentation
- recommended css to prevent "save image" dialog from popping up
- Chessboard does not resize with css "media" rule HOT 1
- Chess
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chessboardjs.