-
-
Notifications
You must be signed in to change notification settings - Fork 871
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Doc] add demo with requirejs, update to v0.6.5 (#493)
* add demo for requirejs * format
- Loading branch information
Showing
7 changed files
with
72 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>jsMind</title> | ||
<link | ||
type="text/css" | ||
rel="stylesheet" | ||
href="https://unpkg.com/jsmind@latest/style/jsmind.css" | ||
/> | ||
<style type="text/css"> | ||
#jsmind_container { | ||
width: 900px; | ||
height: 600px; | ||
border: solid 1px #ccc; | ||
background: #f4f4f4; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p>查看页面源文件了解具体写法</p> | ||
<p>See the page source for details</p> | ||
<div id="jsmind_container"></div> | ||
</body> | ||
|
||
<script src="https://requirejs.org/docs/release/2.3.6/minified/require.js"></script> | ||
<script type="text/javascript"> | ||
require.config({ | ||
paths: { | ||
// note: replace `latest` with a specific version on production | ||
'jsmind': 'https://unpkg.com/jsmind@latest/es6/jsmind', | ||
'jsmind/draggable_node': | ||
'https://unpkg.com/jsmind@latest/es6/jsmind.draggable-node', | ||
}, | ||
}); | ||
require(['jsmind', 'jsmind/draggable_node'], function (jsMind, _) { | ||
let mind = { | ||
meta: { | ||
name: 'jsMind example', | ||
author: '[email protected]', | ||
version: '0.6.5', | ||
}, | ||
format: 'node_tree', | ||
data: { | ||
id: 'root', | ||
topic: 'jsMind', | ||
children: [], | ||
}, | ||
}; | ||
let options = { | ||
container: 'jsmind_container', | ||
editable: true, | ||
theme: 'primary', | ||
}; | ||
let jm = new jsMind(options); | ||
jm.show(mind); | ||
}); | ||
</script> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* https://github.com/hizzgdev/jsmind/ | ||
*/ | ||
|
||
export const __version__ = '0.6.5-preview'; | ||
export const __version__ = '0.6.5'; | ||
export const __author__ = '[email protected]'; | ||
|
||
if (typeof String.prototype.startsWith != 'function') { | ||
|