-
Notifications
You must be signed in to change notification settings - Fork 823
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signature Pad. Add ability to use background image (#6744)
* work for #4403 Signature Pad. Add ability to use background image * Describe backgroundImage and fix backgroundColor and penColor descriptions * work for #4403 backgroundImage is priopity over backgroundColor * work for #4403 : fix markup tests for vue3 * work for #4403 : fix style and add into general group --------- Co-authored-by: OlgaLarina <[email protected]> Co-authored-by: Roman Tsukanov <[email protected]>
- Loading branch information
1 parent
9ab333e
commit b55c3c2
Showing
24 changed files
with
204 additions
and
20 deletions.
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
packages/survey-angular-ui/src/questions/signature.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "vitest-canvas-mock"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { registerMarkupTests } from "./helper"; | ||
|
||
registerMarkupTests( | ||
[ | ||
{ | ||
name: "Test Signaturepad question markup", | ||
json: { | ||
questions: [ | ||
{ | ||
type: "signaturepad", | ||
name: "q1", | ||
titleLocation: "hidden", | ||
} | ||
] | ||
}, | ||
snapshot: "signaturepad" | ||
}, | ||
{ | ||
name: "Test Signaturepad question with backgroundImage", | ||
json: { | ||
questions: [ | ||
{ | ||
"type": "signaturepad", | ||
"name": "q1", | ||
titleLocation: "hidden", | ||
"backgroundImage": "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg" | ||
} | ||
] | ||
}, | ||
snapshot: "signaturepad-with-backgroundImage" | ||
} | ||
] | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/markup/snapshots/signaturepad-with-backgroundImage.snap.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="sjs_sp_container sv_q_signaturepad" style="height:200px; width:300px;"> | ||
<div class="sjs_sp_placeholder">Sign here</div> | ||
<div> | ||
<img class="sjs_sp__background-image" height="200" src="https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg" width="300"> | ||
<canvas class="sjs_sp_canvas" height="200" style="height:200px; user-select:none; width:300px;" tabindex="0" width="300"> | ||
</canvas> | ||
</div> | ||
<div class="sjs_sp_controls"> | ||
<button class="sjs_sp_clear" title="Clear" type="button"> | ||
<span>✖</span> | ||
</button> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="sjs_sp_container sv_q_signaturepad" style="height:200px; width:300px;"> | ||
<div class="sjs_sp_placeholder">Sign here</div> | ||
<div> | ||
<canvas class="sjs_sp_canvas" height="200" style="height:200px; user-select:none; width:300px;" tabindex="0" width="300"> | ||
</canvas> | ||
</div> | ||
<div class="sjs_sp_controls"> | ||
<button class="sjs_sp_clear" title="Clear" type="button"> | ||
<span>✖</span> | ||
</button> | ||
</div> | ||
</div> |
Oops, something went wrong.