Comments (14)
Then I saw that the npm package hasn't been updated for 2 years?
from react-chessground.
We will fix that.
from react-chessground.
Have you installed and applied style-loader
in webpack?
from react-chessground.
Hi, friend, we have fixed that issue due to changes of css classnames made by chessground
. Pls upgrade react-chessground
to version 1.1.0
. BTW, we have also upgraded all dependency modules to latest versions.
from react-chessground.
Thanks for the update! Styles seem to be doing fine, however the board is still broken. This is what I'm getting from the example after I updated it's dependencies:
I'm also getting the same situation from a CRA project:
import React from 'react';
import logo from './logo.svg';
import './App.css';
import Chessground from 'react-chessground';
import 'react-chessground/dist/styles/chessground.css'
function App() {
return (
<div className="App">
<Chessground
width="38vw"
height="38vw"
orientation={'w'}
turnColor={'w'}
viewOnly={false}
fen={"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"}
style={{ margin: "auto" }}
/> </div>
);
}
export default App;
from react-chessground.
You haven't included theme.css: `import 'react-chessground/dist/assets/theme.css'
from react-chessground.
I'm still getting the same bug. When I originally encountered this I saw the 'import a theme or board won't work' warning in chessground.css so I copied chessground-theme.css from /assets and imported it as such:
import 'react-chessground/dist/styles/chessground-theme.css'
Still, theme is here but positions are messed up
from react-chessground.
Have you upgraded to Version 1.1.0
from react-chessground.
Hey, friend, I've just created a demo repo here using create-create-app
https://github.com/ruilisi/react-chessground-demo.
Hope this could help you!
from react-chessground.
The demo works. Thanks! I've found the culprit. The bug is symptomatic to removing
import "react-chessground/dist/assets/chessground.css";
So far I was importing from "react-chessground/dist/styles/chessground.css";
instead, which was the path instructed in the readme, so that probably needs to be updated too. Thanks for the help!
from react-chessground.
Thanks for noticing that, that was fixed.
from react-chessground.
had same problem with all pieces on a8 square, and only helps these imports:
import "react-chessground/dist/assets/chessground.css"
import "react-chessground/dist/styles/chessground.css"
from react-chessground.
Have you imported /dist/assets/theme.css
?
from react-chessground.
previously - not, but now makes test with this import and it only changed squares on blue color, trying different combinations and works only mentioned in previous comment
from react-chessground.
Related Issues (20)
- Question on registering move in logic HOT 1
- coordinates: false doesn't work HOT 2
- Copy default theme and assets to the chessground HOT 2
- Difficulty on start up HOT 1
- npm package broken!? HOT 1
- Cannot read property 'color' of undefined
- Exception when using latest version of chessground HOT 3
- Example using react hooks HOT 4
- Board and piece options HOT 1
- Package dependencies HOT 2
- Typescript support HOT 3
- TypeError: _a.get is not a function HOT 2
- Demo example doesn't work HOT 4
- Typescrit support
- Clearing autoShapes by passing an empty array not working HOT 2
- Large amount of dependencies
- Publish 1.6.0? HOT 1
- Coordinates won't update until position updates HOT 1
- Using in yarn react project causes pre-flight check warning.
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 react-chessground.