Browse Source

TS SelectPosition

ts-style-manager
Artur Arseniev 4 years ago
parent
commit
ec648e534e
  1. 7
      src/commands/view/SelectPosition.ts

7
src/commands/view/SelectPosition.js → src/commands/view/SelectPosition.ts

@ -1,4 +1,5 @@
import Backbone from 'backbone'; import Backbone from 'backbone';
import { CustomCommand } from './CommandAbstract';
const $ = Backbone.$; const $ = Backbone.$;
export default { export default {
@ -7,7 +8,7 @@ export default {
* @param {HTMLElement} trg * @param {HTMLElement} trg
* @private * @private
* */ * */
startSelectPosition(trg, doc, opts = {}) { startSelectPosition(trg: HTMLElement, doc: Document, opts: any = {}) {
this.isPointed = false; this.isPointed = false;
var utils = this.em.get('Utils'); var utils = this.em.get('Utils');
const container = trg.ownerDocument.body; const container = trg.ownerDocument.body;
@ -85,7 +86,7 @@ export default {
* @return {Boolean} * @return {Boolean}
* @private * @private
* */ * */
nearFloat(index, method, dims) { nearFloat(index: number, method: string, dims: any[]) {
var i = index || 0; var i = index || 0;
var m = method || 'before'; var m = method || 'before';
var len = dims.length; var len = dims.length;
@ -104,4 +105,4 @@ export default {
this.$wrapper.css('cursor', ''); this.$wrapper.css('cursor', '');
this.$wrapper.unbind(); this.$wrapper.unbind();
}, },
}; } as CustomCommand<{}, { [k: string]: any }>;
Loading…
Cancel
Save