fix(report): move side photo preview fill upward
This commit is contained in:
@@ -19,5 +19,12 @@ assert.equal(context.reportZoomSource(img,frame,.5,.5),'cropped');
|
||||
assert.equal(drawn[2][2]-drawn[1][2],drawn[1][4]*.5,'move down by exactly half the scaled photo height');
|
||||
assert.equal(drawn[2][1],drawn[1][1]);assert.equal(drawn[2][3],drawn[1][3]);assert.equal(drawn[2][4],drawn[1][4]);
|
||||
assert.equal(canvases[2].height,canvases[1].height);
|
||||
assert.equal(context.reportZoomSource(img,frame,.5,.3),'cropped');
|
||||
assert(Math.abs((drawn[2][2]-drawn[3][2])-drawn[1][4]*.2)<1e-9,'move fill upward 20% from previous 50% downward offset');
|
||||
assert.equal(canvases[3].height,canvases[2].height);assert.equal(drawn[3][3],drawn[2][3]);
|
||||
assert.equal(context.reportZoomSource(img,frame,.5,.25),'cropped');
|
||||
assert(Math.abs((drawn[3][2]-drawn[4][2])-drawn[1][4]*.05)<1e-9,'move fill upward another 5%');
|
||||
assert.equal(drawn[4][3],drawn[3][3]);assert.equal(canvases[4].height,canvases[3].height);
|
||||
assert(source.includes('sideButton ? .25 : 0'),'net downward offset is 25%');
|
||||
assert(source.includes('sideButton ? .5 : 1'),'half-sized fill applies only to side-photo large previews');
|
||||
console.log('PASS side zoom fill: size halved, then moved down exactly 50% photo height; preview frame/front/small images unchanged');
|
||||
console.log('PASS side zoom fill: half size, shifted upward another5% to net downward25%; preview frame/front/small images unchanged');
|
||||
|
||||
Reference in New Issue
Block a user