diff --git a/packages/core/examples/test/api.html b/packages/core/examples/test/api.html
index 68561a6..cb58688 100644
--- a/packages/core/examples/test/api.html
+++ b/packages/core/examples/test/api.html
@@ -22,7 +22,7 @@
}
.box {
width: 300;
- min-height: 220;
+ min-height: 242;
float: left;
border-right: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
@@ -58,6 +58,39 @@
+
+
+
idraw.selectElementByIndex
+
+
+
+
+
+
+
idraw.moveDownElement
+
+
+
+
+
@@ -145,8 +178,8 @@
const mount = document.querySelector('#idraw-config');
const core = new Core(mount,
Object.assign({}, opts, {
- contextWidth: 700,
- contextHeight: 500,
+ contextWidth: 500,
+ contextHeight: 400,
}),
{
scrollWrapper: {
@@ -179,8 +212,8 @@
const core = new Core(
mount,
Object.assign({}, opts, {
- contextWidth: 700,
- contextHeight: 500,
+ contextWidth: 500,
+ contextHeight: 400,
}),
{
scrollWrapper: {
@@ -205,8 +238,8 @@
const core = new Core(
mount,
Object.assign({}, opts, {
- contextWidth: 700,
- contextHeight: 500,
+ contextWidth: 500,
+ contextHeight: 400,
}),
{
scrollWrapper: {
@@ -220,7 +253,7 @@
width: 280,
height: 160,
contextWidth: 600,
- contextHeight: 500,
+ contextHeight: 400,
})
}, 20)
})();
@@ -231,13 +264,13 @@
import { getData } from './data.js';
import event from './../../../../scripts/browser/event.js';
(function() {
- const mount = document.querySelector('#idraw-api-resetSize');
+ const mount = document.querySelector('#idraw-api-selectElement');
const data = getData();
const core = new Core(
mount,
Object.assign({}, opts, {
- contextWidth: 700,
- contextHeight: 500,
+ contextWidth: 500,
+ contextHeight: 400,
}),
{
scrollWrapper: {
@@ -246,16 +279,239 @@
}
);
core.setData(data);
- setTimeout(() => {
- core.resetSize({
- width: 280,
- height: 160,
- contextWidth: 600,
- contextHeight: 500,
- })
- }, 20)
+ core.selectElement(core.getData().elements[2].uuid);
})();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+