X Tutup
Skip to content

Commit e5d1edc

Browse files
committed
update
1 parent c8650d4 commit e5d1edc

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.DS_Store

0 Bytes
Binary file not shown.

cutter/.DS_Store

0 Bytes
Binary file not shown.

cutter/src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ window.onload = function() {
22

33
function SubType() {
44
var doc = document;
5+
this.containerDom = doc.querySelector('.container');
56
this.pageListDom = Array.prototype.slice.apply(doc.querySelectorAll('.page'));
67
this.fileDom = doc.querySelector('#files');
78
this.picAreaDom = doc.querySelector('.pic-area');
@@ -28,8 +29,8 @@ window.onload = function() {
2829
var _this = this;
2930
this.cutter = new Cutter(this.picAreaDom, {
3031
imgUrl: url,
31-
conWidth: document.body.clientWidth,
32-
conHeight: document.body.clientWidth * 1.2,
32+
conWidth: this.containerDom.offsetWidth,
33+
conHeight: this.containerDom.offsetWidth * 1.2,
3334
speed: 2,
3435
callback: function() {
3536
_this.turnPage(1);

cutter/src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ p {
4747
width: 100%;
4848
height: 0;
4949
padding-bottom: 120%;
50-
background-color: grey;
50+
background-color: #f7f7f7;
5151
overflow: hidden;
5252
box-shadow: 0 2px 10px 2px rgba(255,255,255,0.6);
5353
}

0 commit comments

Comments
 (0)
X Tutup