File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -141,12 +141,18 @@ export class QuestionSignaturePadModel extends QuestionFileModelBase {
141
141
private fromDataUrl ( data : string ) {
142
142
this . _loadedData = data ;
143
143
if ( this . signaturePad ) {
144
- const devicePixelRatio = DomWindowHelper . getDevicePixelRatio ( ) ;
145
- const ratio = ( this . dataFormat === "svg" && ! ! devicePixelRatio ) ? devicePixelRatio : 1 ;
144
+ let ratio = 1 ;
145
+ let scale = this . scale ;
146
+
147
+ if ( this . dataFormat === "svg" ) {
148
+ const devicePixelRatio = DomWindowHelper . getDevicePixelRatio ( ) ;
149
+ ratio = devicePixelRatio || 1 ;
150
+ scale = 1 ;
151
+ }
146
152
147
153
const options = {
148
- width : this . canvas . width * this . scale / ratio ,
149
- height : this . canvas . height * this . scale / ratio
154
+ width : this . canvas . width * scale / ratio ,
155
+ height : this . canvas . height * scale / ratio
150
156
} ;
151
157
this . signaturePad . fromDataURL ( data , options ) ;
152
158
}
You can’t perform that action at this time.
0 commit comments