Skip to content

Commit afefcb7

Browse files
committed
documentacion a estilos, atributos por defecto a JGXBoard nulos
1 parent 2ec62cc commit afefcb7

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ npm install --save jsxgraph-react-js
1111
```
1212

1313
## Usage
14-
1514
View a demo: [https://sytabaresa.github.io/jsxgraph-react-js](https://sytabaresa.github.io/jsxgraph-react-js).
1615

16+
- default style for a JXGBoard is
17+
```css
18+
{
19+
width: 500;
20+
height: 500;
21+
}
22+
```
23+
1724
### With a javascript function:
1825
```jsx
1926
import React, { Component } from 'react'
@@ -41,6 +48,9 @@ class Example extends Component {
4148
<JXGBoard
4249
logic={logicJS}
4350
boardAttributes={{ axis: true, boundingbox: [-12, 10, 12, -10] }}
51+
style={{
52+
border: "3px solid red"
53+
}}
4454
/>
4555
)
4656
}
@@ -111,6 +121,9 @@ class Example extends Component {
111121
return (
112122
<JXGBoard
113123
logic={logicJC}
124+
style={{
125+
border: "3px solid red"
126+
}}
114127
jessieCode
115128
/>
116129
)

example/src/App.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ export default class App extends Component {
7373
render() {
7474
return (
7575
<div>
76-
<h1>JSXGraph with javascript function:</h1>
76+
<h1>JSXGraph with javascript function and style:</h1>
7777
<JXGBoard
7878
logic={logicJS}
7979
boardAttributes={{ axis: true, boundingbox: [-12, 10, 12, -10] }}
80+
style={{
81+
border: "3px solid red"
82+
}}
8083
/>
8184
<h1>JSXGraph with JessieCode string:</h1>
8285
<JXGBoard

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "jsxgraph-react-js",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "React component library for use Javascript or JessieCode for make JSXGraph boards",
55
"author": "sytabaresa",
66
"license": "MIT",
7-
"repository": "sytabaresa/jsxgraph-react",
7+
"repository": "sytabaresa/jsxgraph-react-js",
88
"main": "dist/index.js",
99
"module": "dist/index.es.js",
1010
"jsnext:main": "dist/index.es.js",

src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export default class JXGBoard extends Component {
1919
this.id = 'board_' + Math.random().toString(36).substr(2, 9);;
2020
this.state = { board: null };
2121
this.defaultStyle = { width: 500, height: 500 };
22-
this.defauflboardAttributes = {
23-
boundingbox: [-1, 1, 1, -1], keepaspectratio: true, axis: true
24-
}
22+
this.defauflboardAttributes = {}
2523
}
2624

2725
//called right before child lifecycles, passes context object to all children

0 commit comments

Comments
 (0)