Commit cf69c6b1 authored by liujiaxin's avatar liujiaxin

fix: change image

parent 71740c53
......@@ -208,15 +208,16 @@ export class PlayComponent extends BaseResizeComponent implements OnInit, AfterV
const vh = this.readingContainer.nativeElement.offsetHeight;
const w = this.readingContainer.nativeElement.offsetWidth / 2 - 0.04 * vh;
const h = this.readingContainer.nativeElement.offsetHeight - 0.08 * vh;
// const w_zoom = pos.hl_w / w;
// const h_zoom = pos.hl_h / h;
// const zoom = Math.min(w_zoom, h_zoom);
const part = this.parts[index];
let zoom = w / part.data.width;
if (part.data.height >= part.data.width) {
zoom = h / part.data.height;
}
const zoomW = w / part.data.width;
const zoomH = h / part.data.height;
const zoom = Math.min(zoomW, zoomH)
// if (part.data.height >= part.data.width) {
// const zoomH = h / part.data.height;
// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment