Skip to content

Commit 75910ab

Browse files
committed
fix: minor update
1 parent 9c9615d commit 75910ab

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

lib/canvasSettings.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<option value="radial">Radial</option>
6767
</select>
6868
</div>
69-
<div class="input-container">
69+
<div id="angle-input-container" class="input-container">
7070
<label>Angle</label>
7171
<div class="custom-number-input">
7272
<button class="decrease">-</button>
@@ -80,6 +80,16 @@
8080
</div>
8181
`)
8282

83+
$(`${this.containerSelector} .toolpanel#background-panel .content .gradient-orientation-container #select-orientation`).change(function () {
84+
let type = $(this).val();
85+
console.log('orientation', type)
86+
if (type === 'radial') {
87+
$(this).closest('.gradient-orientation-container').find('#angle-input-container').hide();
88+
} else {
89+
$(this).closest('.gradient-orientation-container').find('#angle-input-container').show();
90+
}
91+
})
92+
8393
$(`${this.containerSelector} .toolpanel#background-panel .content .tab-label`).click(function () {
8494
$(`${_self.containerSelector} .toolpanel#background-panel .content .tab-label`).removeClass('active');
8595
$(this).addClass('active');

lib/selectionSettings.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302
<option value="radial">Radial</option>
303303
</select>
304304
</div>
305-
<div class="input-container">
305+
<div id="angle-input-container" class="input-container">
306306
<label>Angle</label>
307307
<div class="custom-number-input">
308308
<button class="decrease">-</button>
@@ -316,6 +316,16 @@
316316
</div>
317317
`);
318318

319+
$(`${this.containerSelector} .toolpanel#select-panel .content .gradient-orientation-container #select-orientation`).change(function () {
320+
let type = $(this).val();
321+
console.log('orientation', type)
322+
if (type === 'radial') {
323+
$(this).closest('.gradient-orientation-container').find('#angle-input-container').hide();
324+
} else {
325+
$(this).closest('.gradient-orientation-container').find('#angle-input-container').show();
326+
}
327+
})
328+
319329
$(`${this.containerSelector} .toolpanel#select-panel .content .tab-label`).click(function () {
320330
$(`${_self.containerSelector} .toolpanel#select-panel .content .tab-label`).removeClass('active');
321331
$(this).addClass('active');

0 commit comments

Comments
 (0)