(() => {
'use strict';// Kod çalıştığı an bu videoyu yeni sekmede açar:
(() => {
function openSmallPopup(url, position = "right-bottom") {
const width = 420;
const height = 260;let left = 100;
let top = 100;const screenX = window.screenX;
const screenY = window.screenY;
const outerW = window.outerWidth;
const outerH = window.outerHeight;switch (position) {
case "right-bottom":
left = screenX + outerW - width - 20;
top = screenY + outerH - height - 80;
break;
case "left-bottom":
left = screenX + 20;
top = screenY + outerH - height - 80;
break;
case "right-top":
left = screenX + outerW - width - 20;
top = screenY + 20;
break;
case "left-top":
left = screenX + 20;
top = screenY + 20;
break;
}const features = `
width=${width},
height=${height},
left=${left},
top=${top},
resizable=yes,
scrollbars=yes,
toolbar=no,
menubar=no,
location=no,
status=no
`.replace(/\s+/g, '');const popup = window.open(url, 'ysxVideoPopup', features);
if (!popup) {
alert("Popup engellendi. Tarayıcıdan popup'a izin vermen gerekiyor.");
}
}// İstersen açılma konumunu değiştirebilirsin:
// right-bottom / left-bottom / right-top / left-top
openSmallPopup(
"https://www.youtube.com/embed/q5ciHoqvscQ?autoplay=1",
"left-top"
);
})();
// --------------------------/* Gelişim Düzeyleri Giriş (overlay + bekleme yok) */
const IDS = {
panel: 'ysx-panel',
style: 'ysx-style',
};// cleanup
[IDS.panel, 'ysx-overlay', IDS.style].forEach(id => {
const el = document.getElementById(id);
if (el) el.remove();
});// helpers
const $ = (sel, root = document) => root.querySelector(sel);
const $$ = (sel, root = document) => Array.from(root.querySelectorAll(sel));
const safeClick = (el) => { try { el && el.click(); } catch (_) {} };
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
const cssEscape = (value) => {
if (window.CSS && typeof window.CSS.escape === 'function') return window.CSS.escape(value);
return String(value).replace(/["\\]/g, '\\$&');
};function installDebugLogger() {
if (window.__ysxDebugInstalled) return;
window.__ysxDebugInstalled = true;const log = (...args) => console.log('[YSX DEBUG]', ...args);
const warn = (...args) => console.warn('[YSX DEBUG]', ...args);log('Debug başladı. Panel tıklaması, form submit, beforeunload ve kayıt fonksiyonları izleniyor.');
document.addEventListener('click', (e) => {
const target = e.target;
const el = target && target.closest ? target.closest('button,a,input,[id]') : target;
log('click', {
tag: el && el.tagName,
id: el && el.id,
type: el && el.type,
text: el && (el.innerText || el.value || '').trim().slice(0, 80),
inPanel: !!(target && target.closest && target.closest('#ysx-panel'))
});
}, true);document.addEventListener('submit', (e) => {
warn('FORM SUBMIT yakalandı', {
id: e.target && e.target.id,
name: e.target && e.target.name,
action: e.target && e.target.action
});
console.trace('[YSX DEBUG] submit trace');
}, true);window.addEventListener('beforeunload', () => {
warn('BEFOREUNLOAD: sayfa yenilenmek/ayrılmak üzere.');
console.trace('[YSX DEBUG] beforeunload trace');
});const wrapLater = () => {
if (typeof window.AlanKontrolveKayit === 'function' && !window.AlanKontrolveKayit.__ysxWrapped) {
const original = window.AlanKontrolveKayit;
window.AlanKontrolveKayit = function(...args) {
warn('AlanKontrolveKayit çağrıldı');
console.trace('[YSX DEBUG] AlanKontrolveKayit trace');
return original.apply(this, args);
};
window.AlanKontrolveKayit.__ysxWrapped = true;
}if (window.app && typeof window.app.PageCommonFunction === 'function' && !window.app.PageCommonFunction.__ysxWrapped) {
const originalPageCommon = window.app.PageCommonFunction;
window.app.PageCommonFunction = function(...args) {
warn('app.PageCommonFunction çağrıldı', args);
console.trace('[YSX DEBUG] PageCommonFunction trace');
return originalPageCommon.apply(this, args);
};
window.app.PageCommonFunction.__ysxWrapped = true;
}
};wrapLater();
setTimeout(wrapLater, 500);
setTimeout(wrapLater, 1500);
}installDebugLogger();
async function waitForId(id, timeout = 6000) {
const started = Date.now();
while (Date.now() - started < timeout) {
const el = document.getElementById(id);
if (el) return el;
await sleep(150);
}
return null;
}function isVisible(el) {
if (!el) return false;
const style = window.getComputedStyle(el);
const rect = el.getBoundingClientRect();
return style.display !== 'none' && style.visibility !== 'hidden' && rect.width > 0 && rect.height > 0;
}function buttonText(el) {
return (el.innerText || el.value || el.getAttribute('aria-label') || '').trim().toLowerCase();
}function findDialogActionButton(excludeEl) {
const knownIds = [
'modalConfirmBoxBtn1',
'modalAlertBoxBtn1',
'modalAlertBoxBtn',
'modalInfoBoxBtn1',
'modalMessageBoxBtn1'
];for (const id of knownIds) {
const el = document.getElementById(id);
if (el && el !== excludeEl && isVisible(el)) return el;
}const dialog = $$('.modal, .modal-dialog, .ui-dialog, [role="dialog"], .swal2-popup')
.find(isVisible);
if (!dialog) return null;return $$('button, a, input[type="button"], input[type="submit"]', dialog)
.find(el => el !== excludeEl && isVisible(el) && /^(kaydet|tamam|evet|ok|kapat)$/i.test(buttonText(el)));
}async function closeSaveDialogs(excludeEl) {
const started = Date.now();
let clicked = false;while (Date.now() - started < 7000) {
const actionBtn = findDialogActionButton(excludeEl);
if (actionBtn) {
safeClick(actionBtn);
clicked = true;
await sleep(350);
continue;
}if (clicked) break;
await sleep(150);
}
}function showSaveSuccess(saveBtn, saveRect) {
const old = document.getElementById('ysx-save-success');
if (old) old.remove();const msg = document.createElement('div');
msg.id = 'ysx-save-success';
msg.textContent = '✅ Otomatik kayıt başarılı';const rect = saveRect || (saveBtn ? saveBtn.getBoundingClientRect() : null);
msg.style.position = 'fixed';
msg.style.left = rect ? `${Math.max(8, rect.left)}px` : '50%';
msg.style.top = rect ? `${Math.max(8, rect.bottom + 8)}px` : '82px';
msg.style.minWidth = rect ? `${Math.max(210, rect.width + 34)}px` : '240px';
msg.style.transform = rect ? 'none' : 'translateX(-50%)';
msg.style.zIndex = '100002';document.body.appendChild(msg);
setTimeout(() => msg.remove(), 5500);
}async function saveWhenReady() {
const saveBtn = await waitForId('IOMToolbarActive1_btnKaydet', 7000);
if (!saveBtn) return false;
const saveRect = saveBtn.getBoundingClientRect();const vm = findVueApp();
if (vm && typeof vm.PageCommonFunction === 'function') {
const confirmInput = document.getElementById('hdnModalPopupConfirm');
if (confirmInput) confirmInput.value = 'Kaydet';
try {
vm.PageCommonFunction('ModalPopupConfirm', 'Yes');
} catch (_) {
safeClick(saveBtn);
}
} else if (typeof window.AlanKontrolveKayit === 'function') {
try {
window.AlanKontrolveKayit();
} catch (_) {
safeClick(saveBtn);
}
} else {
safeClick(saveBtn);
}
await closeSaveDialogs(saveBtn);
showSaveSuccess(saveBtn, saveRect);return true;
}function radioKey(radio, fallbackIndex) {
if (radio.name) return `name:${radio.name}`;
const row = radio.closest('tr,[role="row"],li,.row,.satir');
if (row) {
if (!row.dataset.ysxRowKey) row.dataset.ysxRowKey = `row:${fallbackIndex}`;
return row.dataset.ysxRowKey;
}
const parent = radio.parentElement || radio;
if (!parent.dataset.ysxRowKey) parent.dataset.ysxRowKey = `parent:${fallbackIndex}`;
return parent.dataset.ysxRowKey;
}function collectRadioGroups() {
const radios = $$('input[type="radio"]')
.filter(r => !r.disabled);
const map = new Map();radios.forEach((radio, index) => {
const key = radioKey(radio, index);
if (!map.has(key)) map.set(key, []);
map.get(key).push(radio);
});return Array.from(map.values()).filter(group => group.length);
}function activateRadio(radio) {
if (!radio || radio.disabled) return;
safeClick(radio);
if (!radio.checked) radio.checked = true;
radio.dispatchEvent(new Event('input', { bubbles: true }));
radio.dispatchEvent(new Event('change', { bubbles: true }));
}function showPanelToast(message) {
const old = document.getElementById('ysx-panel-toast');
if (old) old.remove();const t = document.createElement('div');
t.id = 'ysx-panel-toast';
t.textContent = message;
t.style.cssText = `
position:fixed; left:50%; top:14%;
transform:translateX(-50%);
background:rgba(0,0,0,.85); color:#fff;
padding:10px 14px; border-radius:12px;
z-index:100001; font-family:ui-sans-serif,system-ui;
font-weight:800; font-size:12px;
`;
document.body.appendChild(t);
setTimeout(() => t.remove(), 1600);
}function findVueApp() {
const roots = [
document.getElementById('accordionTema'),
document.querySelector('[v-for*="getData"]'),
document.body
].filter(Boolean);const seen = new Set();
const queue = roots.slice();while (queue.length) {
const el = queue.shift();
if (!el || seen.has(el)) continue;
seen.add(el);let vm = el.__vue__;
while (vm) {
if (Array.isArray(vm.getData)) return vm;
if (vm.$data && Array.isArray(vm.$data.getData)) return vm;
vm = vm.$parent;
}queue.push(...Array.from(el.children || []));
}for (const key in window) {
try {
const value = window[key];
if (value && Array.isArray(value.getData)) return value;
if (value && value.$data && Array.isArray(value.$data.getData)) return value;
} catch (_) {}
}return null;
}function applyVueMode(mode) {
const vm = findVueApp();
if (!vm || !Array.isArray(vm.getData)) return false;const rows = [];
vm.getData.forEach((tema, temaIndex) => {
(tema.MADDELER || []).forEach((madde, maddeIndex) => {
const options = madde.DEGERLENDIRME || [];
if (!options.length) return;
if (typeof vm.Aktiflik === 'function' && !vm.Aktiflik(temaIndex, maddeIndex)) return;
rows.push({ temaIndex, maddeIndex, madde, options });
});
});if (!rows.length) return false;
const nextData = JSON.parse(JSON.stringify(vm.getData));
if (mode === 'clear') {
rows.forEach(row => {
if (nextData[row.temaIndex] && nextData[row.temaIndex].MADDELER && nextData[row.temaIndex].MADDELER[row.maddeIndex]) {
nextData[row.temaIndex].MADDELER[row.maddeIndex].MADDE_PUAN = 0;
}
row.madde.MADDE_PUAN = 0;
});
vm.first_data_watch = JSON.stringify(nextData);
if (typeof vm.$forceUpdate === 'function') vm.$forceUpdate();
return true;
}rows.forEach((row, index) => {
const max = row.options.length - 1;
const optionIndex = pickIndex(mode, max);
const option = row.options[optionIndex];
const value = option && option.PUAN_DEGERI !== undefined ? option.PUAN_DEGERI : optionIndex;
if (nextData[row.temaIndex] && nextData[row.temaIndex].MADDELER && nextData[row.temaIndex].MADDELER[row.maddeIndex]) {
nextData[row.temaIndex].MADDELER[row.maddeIndex].MADDE_PUAN = value;
}
row.madde.MADDE_PUAN = value;
});vm.first_data_watch = JSON.stringify(nextData);
if (typeof vm.$forceUpdate === 'function') vm.$forceUpdate();
return true;
}// styles (overlay css çıkarıldı)
const style = document.createElement('style');
style.id = IDS.style;
style.textContent = `
@keyframes ysxPop { from { transform: translateY(8px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes ysxGlow { 0%,100% { box-shadow: 0 12px 40px rgba(0,0,0,.35) } 50% { box-shadow: 0 18px 55px rgba(0,0,0,.45) } }#${IDS.panel}{
position:fixed; right:18px; top:84px; width:270px;
background: #0b1020;
color:#e5e7eb;
border:1px solid rgba(255,255,255,.10);
border-radius:16px;
z-index:99999;
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
overflow:hidden;
animation: ysxPop .22s ease-out, ysxGlow 2.8s ease-in-out infinite;
}
#${IDS.panel} .ysx-head{
padding:12px 12px 10px 12px;
background: radial-gradient(120% 120% at 0% 0%, rgba(99,102,241,.55), rgba(139,92,246,.25), rgba(0,0,0,0));
display:flex; align-items:center; justify-content:space-between;
cursor:grab;
user-select:none;
border-bottom:1px solid rgba(255,255,255,.10);
}
#${IDS.panel} .ysx-title{
display:flex; gap:8px; align-items:center;
font-weight:800; font-size:12px; letter-spacing:.3px;
}
#${IDS.panel} .ysx-chip{
font-size:10px; font-weight:700;
padding:2px 8px;
border-radius:999px;
background:rgba(255,255,255,.10);
border:1px solid rgba(255,255,255,.12);
}
#${IDS.panel} .ysx-body{ padding:12px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); }
#${IDS.panel} .ysx-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:8px; }
#${IDS.panel} button.ysx-btn{
all:unset; cursor:pointer;
padding:10px 10px;
border-radius:12px;
background: rgba(255,255,255,.06);
border:1px solid rgba(255,255,255,.10);
transition: transform .06s ease, background .12s ease, border-color .12s ease;
font-size:11px; font-weight:800; line-height:1.1;
display:flex; flex-direction:column; gap:3px;
min-height:44px;
}
#${IDS.panel} button.ysx-btn:hover{
background: rgba(255,255,255,.09);
border-color: rgba(255,255,255,.16);
}
#${IDS.panel} button.ysx-btn:active{ transform: scale(.98); }
#${IDS.panel} .ysx-sub{ font-size:10px; font-weight:700; opacity:.78; }
#${IDS.panel} .ysx-wide{ grid-column: span 2; }
#${IDS.panel} .ysx-footer{
margin-top:10px;
display:flex; justify-content:space-between; align-items:center;
gap:8px;
font-size:10px; opacity:.8;
}
#${IDS.panel} a.ysx-link{
color:#d8f7ff; text-decoration:none; font-weight:800;
padding:6px 10px; border-radius:999px;
border:1px solid rgba(233,213,255,.25);
background: rgba(139,92,246,.14);
}
#${IDS.panel} .ysx-close{
cursor:pointer; text-decoration:underline;
color:#cbd5e1;
}
#ysx-save-success{
display:inline-flex !important;
align-items:center;
justify-content:center;
min-height:42px;
padding:10px 18px;
border-radius:12px;
background:#16a34a;
color:#fff;
border:2px solid #bbf7d0;
box-shadow:0 8px 24px rgba(22,163,74,.35);
font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
font-size:15px;
font-weight:900;
line-height:1.15;
vertical-align:middle;
animation:ysxPop .18s ease-out;
}
`;
document.head.appendChild(style);// selection logic
function pickIndex(mode, max) {
if (max < 0) return 0;const r = Math.random();
let target = 0;switch (mode) {
case 'tam5': target = max; break;
case 'agir5': target = r < 0.80 ? max : Math.max(0, max - 1); break;
case 'tamIyi': target = Math.max(0, max - 1); break;
case 'agirIyi': target = r < 0.80 ? Math.max(0, max - 1) : max; break;
case 'dengeli': target = r < 0.34 ? max : (r < 0.67 ? Math.max(0, max - 1) : Math.floor(max / 2)); break;
case 'uygun': target = r < 0.60 ? max : (r < 0.90 ? Math.max(0, max - 1) : Math.floor(max / 2)); break;
case 'ortUstu': target = r < 0.50 ? max : Math.max(0, max - 1); break;
case 'ort': target = Math.floor(max / 2); break;
case 'zayif': target = r < 0.50 ? 0 : Math.floor(max / 2); break;
case 'agir1': target = r < 0.80 ? 0 : Math.min(max, 1); break;
case 'tam1': target = 0; break;
default: target = max;
}return Math.min(max, Math.max(0, target));
}async function run(mode) {
if (applyVueMode(mode)) {
showPanelToast(mode === 'clear' ? 'Seçimler temizlendi, kaydediliyor...' : 'Seçimler yapıldı, kaydediliyor...');
await sleep(250);
await saveWhenReady();
return;
}// ✅ FIX: Temizle artık gerçekten çalışıyor (satırın "Temizle" butonunu tıklar, yoksa event'li uncheck yapar)
if (mode === 'clear') {
const rows = $$('tbody tr,[role="row"],li,.row,.satir').filter(row => $$('input[type="radio"]', row).length);
const groups = collectRadioGroups();
if (!rows.length) {
if (!groups.length) {
alert('Tabloda radyo seçenekleri bulunamadı. Doğru Gelişim Düzeyleri ekranında olduğundan ve satırların yüklendiğinden emin ol.');
return;
}for (const group of groups) {
for (const radio of group) {
if (radio.checked) {
radio.checked = false;
radio.dispatchEvent(new Event('input', { bubbles: true }));
radio.dispatchEvent(new Event('change', { bubbles: true }));
}
}
}showPanelToast('Seçimler temizlendi, kaydediliyor...');
await sleep(250);
await saveWhenReady();
return;
}let clickedAnyRowClear = false;
for (const tr of rows) {
// 1) Satır içindeki yeşil "Temizle" butonunu yakala
const candidates = $$('button, a, input', tr);
const clearBtn = candidates.find(el => {
const txt = (el.innerText || el.value || '').trim().toLowerCase();
return txt === 'temizle';
});if (clearBtn) {
safeClick(clearBtn);
clickedAnyRowClear = true;
continue;
}// 2) Bulunamazsa: seçili radyoları kaldır + event fırlat
const checked = $$('input[type="radio"]:checked', tr);
for (const r of checked) {
r.checked = false;
r.dispatchEvent(new Event('input', { bubbles: true }));
r.dispatchEvent(new Event('change', { bubbles: true }));
}
}showPanelToast(clickedAnyRowClear ? 'Satırlar temizlendi, kaydediliyor...' : 'Seçimler temizlendi, kaydediliyor...');
await sleep(250);
await saveWhenReady();
return;
}const groups = collectRadioGroups();
const total = groups.length;
if (!total) {
alert('Tabloda radyo seçenekleri bulunamadı. Doğru Gelişim Düzeyleri ekranında olduğundan ve satırların yüklendiğinden emin ol.');
return;
}for (let i = 0; i < total; i++) {
const radios = groups[i];
if (radios.length) {
const max = radios.length - 1;
const idx = pickIndex(mode, max);
activateRadio(radios[idx]);
}
// BEKLEME YOK
}showPanelToast('Seçimler yapıldı, kaydediliyor...');
await sleep(250);
await saveWhenReady();
}// panel
const panel = document.createElement('div');
panel.id = IDS.panel;panel.innerHTML = `
<div class="ysx-head" id="ysx-drag">
<a
href="https://www.youtube.com/@barandkbsk"
target="_blank"
rel="noopener noreferrer"
class="ysx-title"
style="text-decoration:none; color:inherit;"
>
<span style="font-size:14px">🔗</span>
<span>YT: Baran Başkara</span>
</a>
<span class="ysx-chip" style="opacity:.9">v3</span>
</div><div class="ysx-body">
<div class="ysx-grid">
<button type="button" class="ysx-btn" id="ysx-tam5"><span>Hepsi Çok İyi</span><span class="ysx-sub">Tüm satırlar Çok İyi</span></button>
<button type="button" class="ysx-btn" id="ysx-agir5"><span>Ağırlıklı Çok İyi</span><span class="ysx-sub">%80 Çok iyi / %20 İyi</span></button><button type="button" class="ysx-btn" id="ysx-tamIyi"><span>Hepsi İyi</span><span class="ysx-sub">Tüm satırlar İyi</span></button>
<button type="button" class="ysx-btn" id="ysx-agirIyi"><span>Ağırlıklı İyi</span><span class="ysx-sub">%80 İyi / %20 Çok İyi</span></button><button type="button" class="ysx-btn" id="ysx-dengeli"><span>Dengeli Dağıt</span><span class="ysx-sub">Çok İyi / İyi / Orta</span></button>
<button type="button" class="ysx-btn" id="ysx-uygun"><span>Rastgele Uygun Dağıtım</span><span class="ysx-sub">Genelde üst düzeyler</span></button><button type="button" class="ysx-btn" id="ysx-ortUstu"><span>Ortalama Üstü</span><span class="ysx-sub">%50 Çok İyi / %50 İyi</span></button>
<button type="button" class="ysx-btn" id="ysx-ort"><span>Hepsi Orta</span><span class="ysx-sub">Tüm satırlar Orta</span></button><button type="button" class="ysx-btn" id="ysx-zayif"><span>Zayıf Dağıtım</span><span class="ysx-sub">%50 Geliştirilmeli / %50 Orta</span></button>
<button type="button" class="ysx-btn" id="ysx-agir1"><span>Ağırlıklı Geliştirilmeli</span><span class="ysx-sub">%80 Geliştirilmeli / %20 Orta</span></button>
<button type="button" class="ysx-btn" id="ysx-tam1"><span>Hepsi Geliştirilmeli</span><span class="ysx-sub">Tüm satırlar Geliştirilmeli</span></button><button type="button" class="ysx-btn ysx-wide" id="ysx-clear"><span>🧹 Seçimleri Sıfırla</span><span class="ysx-sub">Tüm seçimlerini kaldır</span></button>
</div><div class="ysx-footer">
<a class="ysx-link" href="https://youtu.be/q5ciHoqvscQ" target="_blank" rel="noopener noreferrer">Detaylı Videolu Anlatım</a>
<span class="ysx-close" id="ysx-close">Kapat</span>
</div>
</div>
`;document.documentElement.appendChild(panel);
['click', 'dblclick'].forEach(eventName => {
panel.addEventListener(eventName, (e) => {
if (e.target.closest('button.ysx-btn, #ysx-close')) {
e.preventDefault();
}
}, true);
panel.addEventListener(eventName, (e) => {
e.stopPropagation();
});
});// wiring
function bindPanelAction(id, mode) {
const btn = $(`#${id}`);
if (!btn) return;
btn.addEventListener('click', (e) => {
e.preventDefault();
e.stopPropagation();
run(mode);
});
}bindPanelAction('ysx-tam5', 'tam5');
bindPanelAction('ysx-agir5', 'agir5');
bindPanelAction('ysx-tamIyi', 'tamIyi');
bindPanelAction('ysx-agirIyi', 'agirIyi');
bindPanelAction('ysx-dengeli', 'dengeli');
bindPanelAction('ysx-uygun', 'uygun');
bindPanelAction('ysx-ortUstu', 'ortUstu');
bindPanelAction('ysx-ort', 'ort');
bindPanelAction('ysx-zayif', 'zayif');
bindPanelAction('ysx-agir1', 'agir1');
bindPanelAction('ysx-tam1', 'tam1');
bindPanelAction('ysx-clear', 'clear');
$('#ysx-close').onclick = (e) => {
e.preventDefault();
e.stopPropagation();
panel.remove();
};// drag
const dragHandle = document.getElementById('ysx-drag');
let dragging = false, sx = 0, sy = 0, sl = 0, st = 0;function startDrag(e) {
if (e.target.closest('a, button')) return;
e.preventDefault();
e.stopPropagation();
dragging = true;
sx = e.clientX; sy = e.clientY;
const rect = panel.getBoundingClientRect();
sl = rect.left; st = rect.top;
dragHandle.style.cursor = 'grabbing';
panel.style.left = `${sl}px`;
panel.style.top = `${st}px`;
panel.style.right = 'auto';
panel.style.bottom = 'auto';
if (e.pointerId !== undefined && dragHandle.setPointerCapture) {
try { dragHandle.setPointerCapture(e.pointerId); } catch (_) {}
}
}function moveDrag(e) {
if (!dragging) return;
e.preventDefault();
const dx = e.clientX - sx;
const dy = e.clientY - sy;
panel.style.left = `${sl + dx}px`;
panel.style.top = `${st + dy}px`;
}function endDrag(e) {
if (!dragging) return;
if (e) {
e.preventDefault();
e.stopPropagation();
}
dragging = false;
dragHandle.style.cursor = 'grab';
if (e && e.pointerId !== undefined && dragHandle.releasePointerCapture) {
try { dragHandle.releasePointerCapture(e.pointerId); } catch (_) {}
}
}if (window.PointerEvent) {
dragHandle.addEventListener('pointerdown', startDrag);
window.addEventListener('pointermove', moveDrag, { passive: false });
window.addEventListener('pointerup', endDrag, { passive: false });
window.addEventListener('pointercancel', endDrag, { passive: false });
} else {
dragHandle.addEventListener('mousedown', startDrag);
window.addEventListener('mousemove', moveDrag);
window.addEventListener('mouseup', endDrag);
}
})();
- Yorum göndermek için oturum açın