Skip to content

Commit

Permalink
2024090903
Browse files Browse the repository at this point in the history
  • Loading branch information
Spectrollay committed Sep 10, 2024
1 parent 37da9a9 commit 3faf251
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Verification/file-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"issue_tracker\\index.html": "edc1f27b2d6381751ed4d60d7aa53ccc",
"javascript\\accessibility.js": "4c3d2f7fe221a2bc26da35c85eb344f4",
"javascript\\advanced.js": "288d119cbdc37f0fddc5dc651bab47d8",
"javascript\\custom_elements.js": "cb8a4c8178c3494481a289affb286458",
"javascript\\custom_elements.js": "6b54693216de77be118ce57ed5d30570",
"javascript\\editions.js": "795a056b1011d662f3cbd38c41962bee",
"javascript\\public_define.js": "13e6cc8c4fbfb0cad4dfce352a92f6e0",
"javascript\\public_script.js": "92f0dffd50c059db5fb0378f60cd9168",
Expand Down
2 changes: 1 addition & 1 deletion Verification/project-hash.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"projectHash": "dcdae9b1e9439fe8f158ec946daa46f0"
"projectHash": "7e649d966e86e072c0f30d94dbd51715"
}
2 changes: 1 addition & 1 deletion javascript/custom_elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,14 @@ class CustomSwitch extends HTMLElement {

// 点击和拖动事件
const handlePointerDown = (e) => {
e.preventDefault();
this.isDragging = true;
switchSlider.classList.add('active');
this.startX = e.type === 'mousedown' ? e.clientX : e.touches[0].clientX;
};

const handlePointerUp = (e) => {
if (this.isDragging) {
e.preventDefault();
const currentX = e.type === 'mouseup' ? e.clientX : e.changedTouches[0].clientX;
const distanceMoved = currentX - this.startX;
if (distanceMoved > 10 && !this.isSwitchOn) {
Expand Down

0 comments on commit 3faf251

Please sign in to comment.