Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
hizzgdev committed Oct 17, 2024
2 parents 08a7c84 + 8903546 commit 5ac0eec
Show file tree
Hide file tree
Showing 16 changed files with 1,335 additions and 4,806 deletions.
2 changes: 1 addition & 1 deletion .config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cleanup from 'rollup-plugin-cleanup';
import { terser } from 'rollup-plugin-terser';
import terser from '@rollup/plugin-terser';

export default [
{
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jsMind is mind map library built by javascript, it base on html5 canvas and svg.
<link
type="text/css"
rel="stylesheet"
href="//cdn.jsdelivr.net/npm/[email protected].5/style/jsmind.css"
href="//cdn.jsdelivr.net/npm/[email protected].6/style/jsmind.css"
/>
<script
type="text/javascript"
src="//cdn.jsdelivr.net/npm/[email protected].5/es6/jsmind.js"
src="//cdn.jsdelivr.net/npm/[email protected].6/es6/jsmind.js"
></script>
</head>
<body>
Expand Down
12 changes: 6 additions & 6 deletions docs/en/1.usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ Basic Framework
At first, 2 files (jsmind.css and jsmind.js) are required. Here we link to the resources on the CDN. It is recommended to use the latest version.

```html
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected].5/style/jsmind.css" />
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected].6/style/jsmind.css" />

<script type="text/javascript" src="https://unpkg.com/[email protected].5/es6/jsmind.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected].6/es6/jsmind.js"></script>

```
> CDNs in common use: [UNPKG](https://unpkg.com/jsmind/), [jsDelivr](https://www.jsdelivr.com/package/npm/jsmind/), and [the mirror of jsDelivr in China](https://jsd.onmicrosoft.cn/npm/jsmind/). the resource urls would look like:
> - https://unpkg.com/[email protected].5/es6/jsmind.js
> - https://cdn.jsdelivr.net/npm/[email protected].5/es6/jsmind.js
> - https://jsd.onmicrosoft.cn/npm/[email protected].5/es6/jsmind.js
> - https://unpkg.com/[email protected].6/es6/jsmind.js
> - https://cdn.jsdelivr.net/npm/[email protected].6/es6/jsmind.js
> - https://jsd.onmicrosoft.cn/npm/[email protected].6/es6/jsmind.js
>
> The version number appear in the url of CDN. It's strongly recommended that you also specify the version number in your project to avoid the risks that caused by version upgrades. Access the [jsMind on NPM](https://www.npmjs.com/package/jsmind) to get the latest version number of jsMind.
Add script jsmind.draggable-node.js for enabling draggable node feature.

```html
<script type="text/javascript" src="https://unpkg.com/[email protected].5/es6/jsmind.draggable-node.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected].6/es6/jsmind.draggable-node.js"></script>
```

The second, a div element should be in your HTML as container
Expand Down
6 changes: 3 additions & 3 deletions docs/en/plugin-screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ This feature can support to export mind maps as png images.
```html

<!-- style -->
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected].5/style/jsmind.css" />
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected].6/style/jsmind.css" />

<!-- jsMind -->
<script type="text/javascript" src="https://unpkg.com/[email protected].5/es6/jsmind.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected].6/es6/jsmind.js"></script>

<!-- dependency of screenshot -->
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/dom-to-image.min.js" ></script>

<!-- screenshot plugin -->
<script type="text/javascript" src="https://unpkg.com/[email protected].5/es6/jsmind.screenshot.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected].6/es6/jsmind.screenshot.js"></script>


<script>
Expand Down
12 changes: 6 additions & 6 deletions docs/zh/1.usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@


```html
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected].5/style/jsmind.css" />
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected].6/style/jsmind.css" />

<script type="text/javascript" src="https://unpkg.com/[email protected].5/es6/jsmind.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected].6/es6/jsmind.js"></script>
```

> 常用的 CDN 有 [UNPKG](https://unpkg.com/jsmind/)[jsDelivr](https://www.jsdelivr.com/package/npm/jsmind/),以及 jsDelivr 的[国内镜像](https://jsd.onmicrosoft.cn/npm/jsmind/)。文件路径大概像这样:
> - https://unpkg.com/[email protected].5/es6/jsmind.js
> - https://cdn.jsdelivr.net/npm/[email protected].5/es6/jsmind.js
> - https://jsd.onmicrosoft.cn/npm/[email protected].5/es6/jsmind.js
> - https://unpkg.com/[email protected].6/es6/jsmind.js
> - https://cdn.jsdelivr.net/npm/[email protected].6/es6/jsmind.js
> - https://jsd.onmicrosoft.cn/npm/[email protected].6/es6/jsmind.js
>
> 示例中url中都有版本号,强烈建议你在项目里也指明版本号,以避免版本升级给你的项目带来风险。访问 [NPM 上的 jsMind](https://www.npmjs.com/package/jsmind) 可以获取 jsmind 的最新版本号。
如果希望能够通过鼠标拖拽的方式移动节点,需要额外引用 jsmind.draggable-node.js 文件

```html
<script type="text/javascript" src="https://unpkg.com/[email protected].5/es6/jsmind.draggable-node.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected].6/es6/jsmind.draggable-node.js"></script>
```

其次,要为 jsMind 准备一个容器,jsMind 将在这个容器里显示思维导图。可自行定义容器的id、大小及样式。
Expand Down
6 changes: 3 additions & 3 deletions docs/zh/plugin-screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
```html

<!-- style -->
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected].5/style/jsmind.css" />
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected].6/style/jsmind.css" />

<!-- jsMind -->
<script type="text/javascript" src="https://unpkg.com/[email protected].5/es6/jsmind.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected].6/es6/jsmind.js"></script>

<!-- dependency of screenshot -->
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/dom-to-image.min.js" ></script>

<!-- screenshot plugin -->
<script type="text/javascript" src="https://unpkg.com/[email protected].5/es6/jsmind.screenshot.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected].6/es6/jsmind.screenshot.js"></script>


<script>
Expand Down
6 changes: 3 additions & 3 deletions example/1_basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link
type="text/css"
rel="stylesheet"
href="//cdn.jsdelivr.net/npm/[email protected].5/style/jsmind.css"
href="//cdn.jsdelivr.net/npm/[email protected].6/style/jsmind.css"
/>
<style type="text/css">
#jsmind_container {
Expand All @@ -21,8 +21,8 @@

<body>
<div id="jsmind_container"></div>
<script src="//cdn.jsdelivr.net/npm/[email protected].5/es6/jsmind.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected].5/es6/jsmind.draggable-node.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected].6/es6/jsmind.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected].6/es6/jsmind.draggable-node.js"></script>
<script type="text/javascript">
function load_jsmind() {
var mind = {
Expand Down
6 changes: 3 additions & 3 deletions example/1_basic_cn.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link
type="text/css"
rel="stylesheet"
href="//jsd.onmicrosoft.cn/npm/[email protected].5/style/jsmind.css"
href="//jsd.onmicrosoft.cn/npm/[email protected].6/style/jsmind.css"
/>
<style type="text/css">
#jsmind_container {
Expand All @@ -21,8 +21,8 @@

<body>
<div id="jsmind_container"></div>
<script src="//jsd.onmicrosoft.cn/npm/[email protected].5/es6/jsmind.js"></script>
<script src="//jsd.onmicrosoft.cn/npm/[email protected].5/es6/jsmind.draggable-node.js"></script>
<script src="//jsd.onmicrosoft.cn/npm/[email protected].6/es6/jsmind.js"></script>
<script src="//jsd.onmicrosoft.cn/npm/[email protected].6/es6/jsmind.draggable-node.js"></script>
<script type="text/javascript">
function load_jsmind() {
var mind = {
Expand Down
8 changes: 4 additions & 4 deletions example/2_features.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link
type="text/css"
rel="stylesheet"
href="//cdn.jsdelivr.net/npm/[email protected].5/style/jsmind.css"
href="//cdn.jsdelivr.net/npm/[email protected].6/style/jsmind.css"
/>
<style type="text/css">
li {
Expand Down Expand Up @@ -192,19 +192,19 @@
</div>
<script
type="text/javascript"
src="//cdn.jsdelivr.net/npm/[email protected].5/es6/jsmind.js"
src="//cdn.jsdelivr.net/npm/[email protected].6/es6/jsmind.js"
></script>
<script
type="text/javascript"
src="//cdn.jsdelivr.net/npm/[email protected].5/es6/jsmind.draggable-node.js"
src="//cdn.jsdelivr.net/npm/[email protected].6/es6/jsmind.draggable-node.js"
></script>
<script
type="text/javascript"
src="//cdn.jsdelivr.net/npm/[email protected]/dist/dom-to-image.min.js"
></script>
<script
type="text/javascript"
src="//cdn.jsdelivr.net/npm/[email protected].5/es6/jsmind.screenshot.js"
src="//cdn.jsdelivr.net/npm/[email protected].6/es6/jsmind.screenshot.js"
></script>
<script type="text/javascript" src="2_features.js"></script>
</body>
Expand Down
8 changes: 4 additions & 4 deletions example/2_features_cn.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link
type="text/css"
rel="stylesheet"
href="//jsd.onmicrosoft.cn/npm/[email protected].5/style/jsmind.css"
href="//jsd.onmicrosoft.cn/npm/[email protected].6/style/jsmind.css"
/>
<style type="text/css">
li {
Expand Down Expand Up @@ -199,19 +199,19 @@
</div>
<script
type="text/javascript"
src="//jsd.onmicrosoft.cn/npm/[email protected].5/es6/jsmind.js"
src="//jsd.onmicrosoft.cn/npm/[email protected].6/es6/jsmind.js"
></script>
<script
type="text/javascript"
src="//jsd.onmicrosoft.cn/npm/[email protected].5/es6/jsmind.draggable-node.js"
src="//jsd.onmicrosoft.cn/npm/[email protected].6/es6/jsmind.draggable-node.js"
></script>
<script
type="text/javascript"
src="//jsd.onmicrosoft.cn/npm/[email protected]/dist/dom-to-image.min.js"
></script>
<script
type="text/javascript"
src="//jsd.onmicrosoft.cn/npm/[email protected].5/es6/jsmind.screenshot.js"
src="//jsd.onmicrosoft.cn/npm/[email protected].6/es6/jsmind.screenshot.js"
></script>
<script type="text/javascript" src="2_features.js"></script>
</body>
Expand Down
8 changes: 4 additions & 4 deletions example/3_requirejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link
type="text/css"
rel="stylesheet"
href="https://unpkg.com/[email protected].5/style/jsmind.css"
href="https://unpkg.com/[email protected].6/style/jsmind.css"
/>
<style type="text/css">
#jsmind_container {
Expand All @@ -29,16 +29,16 @@
<script type="text/javascript">
require.config({
paths: {
'jsmind': 'https://unpkg.com/[email protected].5/es6/jsmind',
'jsmind/draggable-node': 'https://unpkg.com/[email protected].5/es6/jsmind.draggable-node',
'jsmind': 'https://unpkg.com/[email protected].6/es6/jsmind',
'jsmind/draggable-node': 'https://unpkg.com/[email protected].6/es6/jsmind.draggable-node',
},
});
require(['jsmind', 'jsmind/draggable-node'], function (jsMind, _) {
let mind = {
meta: {
name: 'jsMind example',
author: '[email protected]',
version: '0.8.5',
version: '0.8.6',
},
format: 'node_tree',
data: {
Expand Down
Loading

0 comments on commit 5ac0eec

Please sign in to comment.