File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed
harmony/rnoh_signature_capture/src/main/ets Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -177,19 +177,21 @@ export struct SignatureCaptureArkView {
177
177
private getReSizePm() {
178
178
const pm = this.getCanvasPixMap();
179
179
const maxSize = this.descriptorWrapper.props.maxSize;
180
- let width = this.context2D.width;
181
- let height = this.context2D.height;
182
- const ratio = width / height;
183
- if (ratio > 1) {
184
- width = maxSize;
185
- height = width / ratio;
186
- } else {
187
- height = maxSize;
188
- width = height * ratio;
180
+ if (maxSize) {
181
+ let width = this.context2D.width;
182
+ let height = this.context2D.height;
183
+ const ratio = width / height;
184
+ if (ratio > 1) {
185
+ width = maxSize;
186
+ height = width / ratio;
187
+ } else {
188
+ height = maxSize;
189
+ width = height * ratio;
190
+ }
191
+ let xScale = width / this.context2D.width / 3.25;
192
+ let yScale = height / this.context2D.height / 3.25;
193
+ pm.scaleSync(xScale, yScale);
189
194
}
190
- let xScale = width / this.context2D.width;
191
- let yScale = height / this.context2D.height;
192
- pm.scaleSync(xScale, yScale);
193
195
return pm;
194
196
}
195
197
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export interface OutgoingAndIncomingData {
18
18
showBorder ?: WithDefault < boolean , true > ,
19
19
showNativeButtons ?: WithDefault < boolean , true > ,
20
20
showTitleLabel ?: WithDefault < boolean , true > ,
21
- maxSize ?: WithDefault < Int32 , 500 > ,
21
+ maxSize ?: Int32 ,
22
22
minStrokeWidth ?: WithDefault < Float , 3 > ,
23
23
maxStrokeWidth ?: WithDefault < Float , 6 > ,
24
24
strokeColor ?: ProcessedColorValue | null ,
You can’t perform that action at this time.
0 commit comments