Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
2d7238f3
Commit
2d7238f3
authored
Aug 04, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 20834
parent
86139e1b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
199 additions
and
201 deletions
+199
-201
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+47
-38
cell/model/FormulaObjects/statisticalFunctions.js
cell/model/FormulaObjects/statisticalFunctions.js
+55
-65
cell/view/CellEditorView.js
cell/view/CellEditorView.js
+95
-96
common/docscoapi.js
common/docscoapi.js
+2
-2
No files found.
cell/model/FormulaObjects/parserFormula.js
View file @
2d7238f3
...
...
@@ -5275,44 +5275,53 @@ function parseNum( str ) {
return
!
isNaN
(
str
);
}
function
matching
(
x
,
y
,
oper
)
{
var
res
=
false
,
rS
;
if
(
y
instanceof
cString
)
{
rS
=
searchRegExp2
(
x
.
value
,
y
.
toString
()
);
switch
(
oper
)
{
case
"
<>
"
:
res
=
!
rS
;
break
;
case
"
=
"
:
default
:
res
=
rS
;
break
;
}
}
else
if
(
typeof
x
===
typeof
y
)
{
switch
(
oper
)
{
case
"
<>
"
:
res
=
(
x
.
value
!=
y
.
value
);
break
;
case
"
>
"
:
res
=
(
x
.
value
>
y
.
value
);
break
;
case
"
<
"
:
res
=
(
x
.
value
<
y
.
value
);
break
;
case
"
>=
"
:
res
=
(
x
.
value
>=
y
.
value
);
break
;
case
"
<=
"
:
res
=
(
x
.
value
<=
y
.
value
);
break
;
case
"
=
"
:
default
:
res
=
(
x
.
value
==
y
.
value
);
break
;
}
}
return
res
;
}
function
matching
(
x
,
y
,
operator
)
{
var
res
=
false
,
rS
;
if
(
cElementType
.
string
===
y
.
type
)
{
y
=
y
.
toString
();
if
(
''
===
y
)
{
// Empty compare string
rS
=
(
cElementType
.
empty
===
x
.
type
);
}
else
{
// Equal only string values
rS
=
(
cElementType
.
string
===
x
.
type
)
?
searchRegExp2
(
x
.
value
,
y
)
:
false
;
}
switch
(
operator
)
{
case
"
<>
"
:
res
=
!
rS
;
break
;
case
"
=
"
:
default
:
res
=
rS
;
break
;
}
}
else
{
rS
=
(
x
.
type
===
y
.
type
);
switch
(
operator
)
{
case
"
<>
"
:
res
=
!
rS
||
(
x
.
value
!=
y
.
value
);
break
;
case
"
>
"
:
res
=
rS
&&
(
x
.
value
>
y
.
value
);
break
;
case
"
<
"
:
res
=
rS
&&
(
x
.
value
<
y
.
value
);
break
;
case
"
>=
"
:
res
=
rS
&&
(
x
.
value
>=
y
.
value
);
break
;
case
"
<=
"
:
res
=
rS
&&
(
x
.
value
<=
y
.
value
);
break
;
case
"
=
"
:
default
:
res
=
(
x
.
value
==
y
.
value
);
break
;
}
}
return
res
;
}
function
GetDiffDate360
(
nDay1
,
nMonth1
,
nYear1
,
nDay2
,
nMonth2
,
nYear2
,
bUSAMethod
)
{
var
nDayDiff
;
...
...
cell/model/FormulaObjects/statisticalFunctions.js
View file @
2d7238f3
...
...
@@ -1145,81 +1145,71 @@ cCOUNTBLANK.prototype.getInfo = function () {
};
};
function
cCOUNTIF
()
{
// cBaseFunction.call( this, "COUNTIF" );
// this.setArgumentsMin( 2 );
// this.setArgumentsMax( 2 );
this
.
name
=
"
COUNTIF
"
;
this
.
type
=
cElementType
.
func
;
this
.
value
=
null
;
this
.
argumentsMin
=
2
;
this
.
argumentsCurrent
=
0
;
this
.
argumentsMax
=
2
;
this
.
formatType
=
{
def
:
-
1
,
//подразумевается формат первой ячейки входящей в формулу.
noneFormat
:
-
2
};
this
.
numFormat
=
this
.
formatType
.
def
;
}
function
cCOUNTIF
()
{
this
.
name
=
"
COUNTIF
"
;
this
.
type
=
cElementType
.
func
;
this
.
value
=
null
;
this
.
argumentsMin
=
2
;
this
.
argumentsCurrent
=
0
;
this
.
argumentsMax
=
2
;
this
.
formatType
=
{
def
:
-
1
,
//подразумевается формат первой ячейки входящей в формулу.
noneFormat
:
-
2
};
this
.
numFormat
=
this
.
formatType
.
def
;
cCOUNTIF
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cCOUNTIF
.
prototype
.
Calculate
=
function
(
arg
)
{
var
arg0
=
arg
[
0
],
arg1
=
arg
[
1
],
_count
=
0
,
valueForSearching
;
if
(
!
(
arg0
instanceof
cRef
||
arg0
instanceof
cRef3D
||
arg0
instanceof
cArea
||
arg0
instanceof
cArea3D
)
)
{
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
if
(
arg1
instanceof
cArea
||
arg1
instanceof
cArea3D
)
{
arg1
=
arg1
.
cross
(
arguments
[
1
].
first
);
}
else
if
(
arg1
instanceof
cArray
)
{
arg1
=
arg1
.
getElementRowCol
(
0
,
0
);
}
cCOUNTIF
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cCOUNTIF
.
prototype
.
Calculate
=
function
(
arg
)
{
var
arg0
=
arg
[
0
],
arg1
=
arg
[
1
],
_count
=
0
,
valueForSearching
;
if
(
!
(
arg0
instanceof
cRef
||
arg0
instanceof
cRef3D
||
arg0
instanceof
cArea
||
arg0
instanceof
cArea3D
))
{
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
if
(
arg1
instanceof
cArea
||
arg1
instanceof
cArea3D
)
{
arg1
=
arg1
.
cross
(
arguments
[
1
].
first
);
}
else
if
(
arg1
instanceof
cArray
)
{
arg1
=
arg1
.
getElementRowCol
(
0
,
0
);
}
arg1
=
arg1
.
tocString
();
arg1
=
arg1
.
tocString
();
if
(
!
(
arg1
instanceof
cString
)
)
{
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
if
(
!
(
arg1
instanceof
cString
)
)
{
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
arg1
=
arg1
.
toString
();
var
operators
=
new
RegExp
(
"
^ *[<=> ]+ *
"
),
search
,
oper
,
val
,
match
=
arg1
.
match
(
operators
);
arg1
=
arg1
.
toString
();
var
operators
=
new
RegExp
(
"
^ *[<=> ]+ *
"
),
search
,
oper
,
val
,
match
=
arg1
.
match
(
operators
);
if
(
match
)
{
search
=
arg1
.
substr
(
match
[
0
].
length
);
oper
=
match
[
0
].
replace
(
/
\s
/g
,
""
);
}
else
{
search
=
arg1
;
}
valueForSearching
=
parseNum
(
search
)
?
new
cNumber
(
search
)
:
new
cString
(
search
);
if
(
arg0
instanceof
cArea
)
{
arg0
.
foreach2
(
function
(
_val
)
{
_count
+=
matching
(
_val
,
valueForSearching
,
oper
);
}
)
}
else
if
(
arg0
instanceof
cArea3D
)
{
val
=
arg0
.
getValue
();
for
(
var
i
=
0
;
i
<
val
.
length
;
i
++
)
{
_count
+=
matching
(
val
[
i
],
valueForSearching
,
oper
);
if
(
match
)
{
search
=
arg1
.
substr
(
match
[
0
].
length
);
oper
=
match
[
0
].
replace
(
/
\s
/g
,
""
);
}
else
{
search
=
arg1
;
}
valueForSearching
=
parseNum
(
search
)
?
new
cNumber
(
search
)
:
new
cString
(
search
);
if
(
arg0
instanceof
cArea
)
{
arg0
.
foreach2
(
function
(
_val
)
{
_count
+=
matching
(
_val
,
valueForSearching
,
oper
);
})
}
else
if
(
arg0
instanceof
cArea3D
)
{
val
=
arg0
.
getValue
();
for
(
var
i
=
0
;
i
<
val
.
length
;
i
++
)
{
_count
+=
matching
(
val
[
i
],
valueForSearching
,
oper
);
}
}
else
{
val
=
arg0
.
getValue
();
_count
+=
matching
(
val
,
valueForSearching
,
oper
);
}
}
else
{
val
=
arg0
.
getValue
();
_count
+=
matching
(
val
,
valueForSearching
,
oper
);
}
return
this
.
value
=
new
cNumber
(
_count
);
};
cCOUNTIF
.
prototype
.
getInfo
=
function
()
{
return
{
name
:
this
.
name
,
args
:
"
( cell-range, selection-criteria )
"
return
this
.
value
=
new
cNumber
(
_count
);
};
cCOUNTIF
.
prototype
.
getInfo
=
function
()
{
return
{
name
:
this
.
name
,
args
:
"
( cell-range, selection-criteria )
"
};
};
};
function
cCOUNTIFS
()
{
cBaseFunction
.
call
(
this
,
"
COUNTIFS
"
);
...
...
cell/view/CellEditorView.js
View file @
2d7238f3
...
...
@@ -191,82 +191,83 @@
return
this
;
}
CellEditor
.
prototype
.
_init
=
function
(
settings
)
{
CellEditor
.
prototype
.
_init
=
function
(
settings
)
{
var
t
=
this
;
var
z
=
t
.
defaults
.
canvasZIndex
;
this
.
defaults
.
padding
=
settings
.
padding
;
if
(
null
!=
this
.
element
)
{
t
.
canvasOuter
=
document
.
createElement
(
'
div
'
);
if
(
null
!=
this
.
element
)
{
t
.
canvasOuter
=
document
.
createElement
(
'
div
'
);
t
.
canvasOuter
.
id
=
"
ce-canvas-outer
"
;
t
.
canvasOuter
.
style
.
display
=
"
none
"
;
t
.
canvasOuter
.
style
.
zIndex
=
z
;
var
innerHTML
=
'
<canvas id="ce-canvas" style="z-index:
'
+
(
z
+
1
)
+
'
"></canvas>
'
;
innerHTML
+=
'
<canvas id="ce-canvas-overlay" style="z-index:
'
+
(
z
+
2
)
+
'
; cursor:
'
+
t
.
defaults
.
cursorShape
+
'
"></canvas>
'
;
innerHTML
+=
'
<canvas id="ce-canvas-overlay" style="z-index:
'
+
(
z
+
2
)
+
'
; cursor:
'
+
t
.
defaults
.
cursorShape
+
'
"></canvas>
'
;
innerHTML
+=
'
<div id="ce-cursor" style="display: none; z-index:
'
+
(
z
+
3
)
+
'
"></div>
'
;
t
.
canvasOuter
.
innerHTML
=
innerHTML
;
this
.
element
.
appendChild
(
t
.
canvasOuter
);
this
.
element
.
appendChild
(
t
.
canvasOuter
);
t
.
canvasOuterStyle
=
t
.
canvasOuter
.
style
;
t
.
canvas
=
document
.
getElementById
(
"
ce-canvas
"
);
t
.
canvasOverlay
=
document
.
getElementById
(
"
ce-canvas-overlay
"
);
t
.
cursor
=
document
.
getElementById
(
"
ce-cursor
"
);
t
.
canvas
=
document
.
getElementById
(
"
ce-canvas
"
);
t
.
canvasOverlay
=
document
.
getElementById
(
"
ce-canvas-overlay
"
);
t
.
cursor
=
document
.
getElementById
(
"
ce-cursor
"
);
t
.
cursorStyle
=
t
.
cursor
.
style
;
}
// create text render
t
.
drawingCtx
=
new
asc
.
DrawingContext
(
{
t
.
drawingCtx
=
new
asc
.
DrawingContext
({
canvas
:
t
.
canvas
,
units
:
1
/*pt*/
,
fmgrGraphics
:
this
.
fmgrGraphics
,
font
:
this
.
m_oFont
}
);
t
.
overlayCtx
=
new
asc
.
DrawingContext
(
{
});
t
.
overlayCtx
=
new
asc
.
DrawingContext
({
canvas
:
t
.
canvasOverlay
,
units
:
1
/*pt*/
,
fmgrGraphics
:
this
.
fmgrGraphics
,
font
:
this
.
m_oFont
}
);
t
.
textRender
=
new
AscCommonExcel
.
CellTextRender
(
t
.
drawingCtx
);
t
.
textRender
.
setDefaultFont
(
settings
.
font
.
clone
()
);
});
t
.
textRender
=
new
AscCommonExcel
.
CellTextRender
(
t
.
drawingCtx
);
t
.
textRender
.
setDefaultFont
(
settings
.
font
.
clone
()
);
// bind event handlers
if
(
t
.
canvasOuter
&&
t
.
canvasOuter
.
addEventListener
)
{
t
.
canvasOuter
.
addEventListener
(
"
mousedown
"
,
function
()
{
return
t
.
_onMouseDown
.
apply
(
t
,
arguments
);
},
false
);
t
.
canvasOuter
.
addEventListener
(
"
mouseup
"
,
function
()
{
return
t
.
_onMouseUp
.
apply
(
t
,
arguments
);
},
false
);
t
.
canvasOuter
.
addEventListener
(
"
mousemove
"
,
function
()
{
return
t
.
_onMouseMove
.
apply
(
t
,
arguments
);
},
false
);
t
.
canvasOuter
.
addEventListener
(
"
mouseleave
"
,
function
()
{
return
t
.
_onMouseLeave
.
apply
(
t
,
arguments
);
},
false
);
if
(
t
.
canvasOuter
&&
t
.
canvasOuter
.
addEventListener
)
{
t
.
canvasOuter
.
addEventListener
(
"
mousedown
"
,
function
()
{
return
t
.
_onMouseDown
.
apply
(
t
,
arguments
);
},
false
);
t
.
canvasOuter
.
addEventListener
(
"
mouseup
"
,
function
()
{
return
t
.
_onMouseUp
.
apply
(
t
,
arguments
);
},
false
);
t
.
canvasOuter
.
addEventListener
(
"
mousemove
"
,
function
()
{
return
t
.
_onMouseMove
.
apply
(
t
,
arguments
);
},
false
);
t
.
canvasOuter
.
addEventListener
(
"
mouseleave
"
,
function
()
{
return
t
.
_onMouseLeave
.
apply
(
t
,
arguments
);
},
false
);
}
// check input, it may have zero len, for mobile version
if
(
t
.
input
&&
t
.
input
.
addEventListener
)
{
t
.
input
.
addEventListener
(
"
focus
"
,
function
()
{
return
t
.
isOpened
?
t
.
_topLineGotFocus
.
apply
(
t
,
arguments
)
:
true
;
},
false
);
t
.
input
.
addEventListener
(
"
mousedown
"
,
function
()
{
if
(
t
.
input
&&
t
.
input
.
addEventListener
)
{
t
.
input
.
addEventListener
(
"
focus
"
,
function
()
{
return
t
.
isOpened
?
t
.
_topLineGotFocus
.
apply
(
t
,
arguments
)
:
true
;
},
false
);
t
.
input
.
addEventListener
(
"
mousedown
"
,
function
()
{
return
t
.
isOpened
?
(
t
.
callTopLineMouseup
=
true
)
:
true
;
},
false
);
t
.
input
.
addEventListener
(
"
mouseup
"
,
function
()
{
return
t
.
isOpened
?
t
.
_topLineMouseUp
.
apply
(
t
,
arguments
)
:
true
;
},
false
);
t
.
input
.
addEventListener
(
"
input
"
,
function
()
{
return
t
.
_onInputTextArea
.
apply
(
t
,
arguments
);
},
false
);
},
false
);
t
.
input
.
addEventListener
(
"
mouseup
"
,
function
()
{
return
t
.
isOpened
?
t
.
_topLineMouseUp
.
apply
(
t
,
arguments
)
:
true
;
},
false
);
t
.
input
.
addEventListener
(
"
input
"
,
function
()
{
return
t
.
_onInputTextArea
.
apply
(
t
,
arguments
);
},
false
);
// Не поддерживаем drop на верхнюю строку
t
.
input
.
addEventListener
(
"
drop
"
,
function
(
e
)
{
t
.
input
.
addEventListener
(
"
drop
"
,
function
(
e
)
{
e
.
preventDefault
();
return
false
;
},
false
);
},
false
);
}
this
.
fKeyMouseUp
=
function
()
{
return
t
.
_onWindowMouseUp
.
apply
(
t
,
arguments
);
return
t
.
_onWindowMouseUp
.
apply
(
t
,
arguments
);
};
this
.
fKeyMouseMove
=
function
()
{
return
t
.
_onWindowMouseMove
.
apply
(
t
,
arguments
);
return
t
.
_onWindowMouseMove
.
apply
(
t
,
arguments
);
};
};
...
...
@@ -555,13 +556,13 @@
}
};
CellEditor
.
prototype
.
setFocus
=
function
(
hasFocus
)
{
CellEditor
.
prototype
.
setFocus
=
function
(
hasFocus
)
{
this
.
hasFocus
=
!!
hasFocus
;
this
.
handlers
.
trigger
(
"
gotFocus
"
,
this
.
hasFocus
);
this
.
handlers
.
trigger
(
"
gotFocus
"
,
this
.
hasFocus
);
};
CellEditor
.
prototype
.
restoreFocus
=
function
()
{
if
(
this
.
isTopLineActive
)
{
if
(
this
.
isTopLineActive
)
{
this
.
input
.
focus
();
}
};
...
...
@@ -1597,52 +1598,51 @@
var
t
=
this
;
t
.
isTopLineActive
=
true
;
t
.
input
.
isFocused
=
true
;
t
.
setFocus
(
true
);
t
.
setFocus
(
true
);
t
.
_hideCursor
();
t
.
_updateTopLineCurPos
();
t
.
_cleanSelection
();
};
CellEditor
.
prototype
.
_topLineMouseUp
=
function
()
{
var
t
=
this
;
this
.
callTopLineMouseup
=
false
;
// при такой комбинации ctrl+a, click, ctrl+a, click не обновляется selectionStart
// поэтому выполняем обработку после обработчика системы
setTimeout
(
function
()
{
var
b
=
t
.
input
.
selectionStart
;
var
e
=
t
.
input
.
selectionEnd
;
if
(
typeof
b
!==
"
undefined
"
)
{
if
(
t
.
cursorPos
!==
b
||
t
.
selectionBegin
!==
t
.
selectionEnd
)
{
t
.
_moveCursor
(
kPosition
,
b
);
}
if
(
b
!==
e
)
{
t
.
_selectChars
(
kPosition
,
e
);
}
}
});
};
CellEditor
.
prototype
.
_topLineMouseUp
=
function
()
{
var
t
=
this
;
this
.
callTopLineMouseup
=
false
;
// при такой комбинации ctrl+a, click, ctrl+a, click не обновляется selectionStart
// поэтому выполняем обработку после обработчика системы
setTimeout
(
function
()
{
var
b
=
t
.
input
.
selectionStart
;
var
e
=
t
.
input
.
selectionEnd
;
if
(
typeof
b
!==
"
undefined
"
)
{
if
(
t
.
cursorPos
!==
b
||
t
.
selectionBegin
!==
t
.
selectionEnd
)
{
t
.
_moveCursor
(
kPosition
,
b
);
}
if
(
b
!==
e
)
{
t
.
_selectChars
(
kPosition
,
e
);
}
}
});
};
CellEditor
.
prototype
.
_syncEditors
=
function
()
{
var
t
=
this
;
var
s1
=
t
.
_getFragmentsText
(
t
.
options
.
fragments
);
var
s1
=
t
.
_getFragmentsText
(
t
.
options
.
fragments
);
var
s2
=
t
.
input
.
value
;
var
l
=
Math
.
min
(
s1
.
length
,
s2
.
length
);
var
l
=
Math
.
min
(
s1
.
length
,
s2
.
length
);
var
i1
=
0
,
i2
=
0
;
while
(
i1
<
l
&&
s1
.
charAt
(
i1
)
===
s2
.
charAt
(
i1
)
)
{
while
(
i1
<
l
&&
s1
.
charAt
(
i1
)
===
s2
.
charAt
(
i1
)
)
{
++
i1
;
}
i2
=
i1
+
1
;
if
(
i2
>=
l
)
{
i2
=
Math
.
max
(
s1
.
length
,
s2
.
length
);
}
else
{
while
(
i2
<
l
&&
s1
.
charAt
(
i1
)
!==
s2
.
charAt
(
i2
)
)
{
if
(
i2
>=
l
)
{
i2
=
Math
.
max
(
s1
.
length
,
s2
.
length
);
}
else
{
while
(
i2
<
l
&&
s1
.
charAt
(
i1
)
!==
s2
.
charAt
(
i2
))
{
++
i2
;
}
}
t
.
_addChars
(
s2
.
slice
(
i1
,
i2
),
i1
);
t
.
_addChars
(
s2
.
slice
(
i1
,
i2
),
i1
);
};
// Content
...
...
@@ -1820,44 +1820,43 @@
}
};
CellEditor
.
prototype
.
_selectChars
=
function
(
kind
,
pos
)
{
CellEditor
.
prototype
.
_selectChars
=
function
(
kind
,
pos
)
{
var
t
=
this
;
var
begPos
,
endPos
;
begPos
=
t
.
selectionBegin
===
t
.
selectionEnd
?
t
.
cursorPos
:
t
.
selectionBegin
;
t
.
_moveCursor
(
kind
,
pos
);
t
.
_moveCursor
(
kind
,
pos
);
endPos
=
t
.
cursorPos
;
t
.
selectionBegin
=
begPos
;
t
.
selectionEnd
=
endPos
;
t
.
_drawSelection
();
if
(
t
.
isTopLineActive
&&
!
t
.
skipTLUpdate
)
{
if
(
t
.
isTopLineActive
&&
!
t
.
skipTLUpdate
)
{
t
.
_updateTopLineCurPos
();
}
};
CellEditor
.
prototype
.
_changeSelection
=
function
(
coord
)
{
CellEditor
.
prototype
.
_changeSelection
=
function
(
coord
)
{
var
t
=
this
;
function
doChangeSelection
(
coordTmp
)
{
function
doChangeSelection
(
coordTmp
)
{
// ToDo реализовать для слова.
if
(
c_oAscCellEditorSelectState
.
word
===
t
.
isSelectMode
)
{
if
(
c_oAscCellEditorSelectState
.
word
===
t
.
isSelectMode
)
{
return
;
}
var
pos
=
t
.
_findCursorPosition
(
coordTmp
);
if
(
pos
!==
undefined
)
{
pos
>=
0
?
t
.
_selectChars
(
kPosition
,
pos
)
:
t
.
_selectChars
(
pos
);
var
pos
=
t
.
_findCursorPosition
(
coordTmp
);
if
(
pos
!==
undefined
)
{
pos
>=
0
?
t
.
_selectChars
(
kPosition
,
pos
)
:
t
.
_selectChars
(
pos
);
}
}
if
(
window
[
'
IS_NATIVE_EDITOR
'
]
)
{
doChangeSelection
(
coord
);
}
else
{
window
.
clearTimeout
(
t
.
selectionTimer
);
t
.
selectionTimer
=
window
.
setTimeout
(
function
()
{
doChangeSelection
(
coord
);
},
0
);
if
(
window
[
'
IS_NATIVE_EDITOR
'
])
{
doChangeSelection
(
coord
);
}
else
{
window
.
clearTimeout
(
t
.
selectionTimer
);
t
.
selectionTimer
=
window
.
setTimeout
(
function
()
{
doChangeSelection
(
coord
);
},
0
);
}
};
...
...
@@ -2644,12 +2643,12 @@
};
/** @param event {MouseEvent} */
CellEditor
.
prototype
.
_onMouseMove
=
function
(
event
)
{
var
coord
=
this
.
_getCoordinates
(
event
);
this
.
clickCounter
.
mouseMoveEvent
(
coord
.
x
,
coord
.
y
);
CellEditor
.
prototype
.
_onMouseMove
=
function
(
event
)
{
var
coord
=
this
.
_getCoordinates
(
event
);
this
.
clickCounter
.
mouseMoveEvent
(
coord
.
x
,
coord
.
y
);
this
.
hasCursor
=
true
;
if
(
c_oAscCellEditorSelectState
.
no
!==
this
.
isSelectMode
)
{
this
.
_changeSelection
(
coord
);
if
(
c_oAscCellEditorSelectState
.
no
!==
this
.
isSelectMode
)
{
this
.
_changeSelection
(
coord
);
}
return
true
;
};
...
...
common/docscoapi.js
View file @
2d7238f3
...
...
@@ -1277,8 +1277,7 @@
//TODO: add checks and error handling
//Get data type
var
dataObject
=
JSON
.
parse
(
e
.
data
);
var
type
=
dataObject
[
'
type
'
];
switch
(
type
)
{
switch
(
dataObject
[
'
type
'
])
{
case
'
auth
'
:
t
.
_onAuth
(
dataObject
);
break
;
...
...
@@ -1325,6 +1324,7 @@
break
;
case
'
license
'
:
t
.
_onLicense
(
dataObject
);
break
;
}
};
sockjs
.
onclose
=
function
(
evt
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment