本文整理匯總了TypeScript中tinymce/core/dom/DOMUtils.DOM.getStyle方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript DOM.getStyle方法的具體用法?TypeScript DOM.getStyle怎麽用?TypeScript DOM.getStyle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tinymce/core/dom/DOMUtils.DOM
的用法示例。
在下文中一共展示了DOM.getStyle方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
const transposeUiContainer = function (element, pos) {
if (element && DOMUtils.DOM.getStyle(element, 'position', true) !== 'static') {
const containerPos = DOMUtils.DOM.getPos(element);
const dx = containerPos.x - element.scrollLeft;
const dy = containerPos.y - element.scrollTop;
return transpose(pos, -dx, -dy);
} else {
return transpose(pos, 0, 0);
}
};
示例2: function
const getUiContainerDelta = function () {
const uiContainer = Env.container;
if (uiContainer && DOMUtils.DOM.getStyle(uiContainer, 'position', true) !== 'static') {
const containerPos = DOMUtils.DOM.getPos(uiContainer);
const dx = uiContainer.scrollLeft - containerPos.x;
const dy = uiContainer.scrollTop - containerPos.y;
return Option.some({
x: dx,
y: dy
});
} else {
return Option.none();
}
};
示例3: hasClass
},
hasClass (elm, cls) {
return DOMUtils.DOM.hasClass(elm, cls);
},
toggleClass (elm, cls, state) {
return DOMUtils.DOM.toggleClass(elm, cls, state);
},
css (elm, name, value?) {
return DOMUtils.DOM.setStyle(elm, name, value);
},
getRuntimeStyle (elm, name) {
return DOMUtils.DOM.getStyle(elm, name, true);
},
on (target, name, callback, scope?) {
return DOMUtils.DOM.bind(target, name, callback, scope);
},
off (target, name, callback) {
return DOMUtils.DOM.unbind(target, name, callback);
},
fire (target, name, args) {
return DOMUtils.DOM.fire(target, name, args);
},
innerHtml (elm, html) {
示例4: function
const getComputedFontProp = function (propName, elm) {
return Option.from(DOMUtils.DOM.getStyle(elm, propName, true));
};