modify test case
This commit is contained in:
79
demo/fitImage.html
Normal file
79
demo/fitImage.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>canvas读取图片</title>
|
||||
<script src="../dep/esl.js"></script>
|
||||
<script src="../dep/jquery.min.js"></script>
|
||||
<script src="../dep/clipper.js"></script>
|
||||
<script src="../dep/hidpi-canvas.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="./css/editor.css">
|
||||
<style>
|
||||
body,
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#points, #points-break, #canvas {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 40px;
|
||||
bottom: 0;
|
||||
}
|
||||
#points, #points-break {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#points i,
|
||||
#points-break i {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#points-break i.break {
|
||||
width: 2px;
|
||||
height: 2px;
|
||||
background: red;
|
||||
}
|
||||
|
||||
#points-break i.inflection {
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
background: green;
|
||||
}
|
||||
|
||||
|
||||
#render-view {
|
||||
margin-left: 50%;
|
||||
width: auto;
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input id="upload-file" type="file">
|
||||
<div id="points" width="800" height="800"></div>
|
||||
<div id="points-break" width="800" height="800"></div>
|
||||
<canvas id="canvas" width="50%" height="100%"></canvas>
|
||||
<div id="render-view" class="render-view glyf-editor" oncontextMenu="return false"></div>
|
||||
|
||||
<script>
|
||||
require.config({
|
||||
baseUrl: '../src',
|
||||
paths: {
|
||||
demo: '../demo/js',
|
||||
}
|
||||
});
|
||||
define('jquery', $);
|
||||
define('ClipperLib', window.ClipperLib);
|
||||
</script>
|
||||
|
||||
<script>require(['demo/fitImage'])</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user