mylomen-server/static/js/event/impl/MouseDownEventImpl.js
shaoyongjun 0bd5a87973 to:sync
2024-11-05 22:43:34 +08:00

33 lines
927 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";
/**
* 使用样式事件
*/
define(function (require, exports, module) {
function handle(e) {
const utils = require('../../common/utils');
const ctx = require('../../common/ctx');
const event = utils.ParseEvent(e);
let curElement = utils.GetEventTarget(event);
let id = curElement.getAttribute("id");
if (id !== "_style_utils") {
id = curElement.closest("#_style_utils").getAttribute("id");
}
console.log("mousedown: ", event,
"\ncurElement:", curElement,
"\nid : ", id)
//这里监听鼠标按下事件
// if (id === "_style_utils") {
// //阻止事件for 应用 样式
// utils.ProhibitDefaultEvent(event);
// }
//阻止事件for 应用 样式
utils.ProhibitDefaultEvent(event);
}
//导出
exports.handle = handle;
});