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
2f686fce
Commit
2f686fce
authored
Feb 02, 2017
by
Alexander Trofimov
Committed by
GitHub
Feb 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #101 from ONLYOFFICE/hotfix/cell-touchpad
fix bug 27197
parents
a74c0530
c62a1be6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
32 deletions
+42
-32
cell/model/FormulaObjects/mathematicFunctions.js
cell/model/FormulaObjects/mathematicFunctions.js
+1
-5
cell/model/FormulaObjects/parserFormula.js
cell/model/FormulaObjects/parserFormula.js
+6
-3
cell/model/FormulaObjects/textanddataFunctions.js
cell/model/FormulaObjects/textanddataFunctions.js
+2
-10
cell/view/EventsController.js
cell/view/EventsController.js
+33
-14
No files found.
cell/model/FormulaObjects/mathematicFunctions.js
View file @
2f686fce
...
...
@@ -3107,16 +3107,12 @@ cROUND.prototype.Calculate = function ( arg ) {
return
Math
[
n
>
0
?
"
floor
"
:
"
ceil
"
](
n
);
}
function
sign
(
n
)
{
return
n
==
0
?
0
:
n
<
0
?
-
1
:
1
}
function
Floor
(
number
,
significance
)
{
var
quotient
=
number
/
significance
;
if
(
quotient
==
0
)
{
return
0
;
}
var
nolpiat
=
5
*
sign
(
quotient
)
*
Math
.
pow
(
10
,
Math
.
floor
(
Math
.
log10
(
Math
.
abs
(
quotient
)
)
)
-
cExcelSignificantDigits
);
var
nolpiat
=
5
*
Math
.
sign
(
quotient
)
*
Math
.
pow
(
10
,
Math
.
floor
(
Math
.
log10
(
Math
.
abs
(
quotient
)
)
)
-
cExcelSignificantDigits
);
return
truncate
(
quotient
+
nolpiat
)
*
significance
;
}
...
...
cell/model/FormulaObjects/parserFormula.js
View file @
2f686fce
...
...
@@ -616,9 +616,12 @@ Math.approxEqual = function ( a, b ) {
return
this
.
abs
(
a
-
b
)
<
1
e
-
15
;
};
Math
.
sign
=
function
(
x
)
{
return
x
>
0
?
1
:
x
<
0
?
-
1
:
0
;
};
if
(
typeof
Math
.
sign
!=
'
function
'
)
{
Math
[
'
sign
'
]
=
Math
.
sign
=
function
(
n
)
{
return
n
==
0
?
0
:
n
<
0
?
-
1
:
1
;
};
}
RegExp
.
escape
=
function
(
text
)
{
return
text
.
replace
(
/
[
-[
\]
{}()*+?.,
\\
^$|#
\s]
/g
,
"
\\
$&
"
);
...
...
cell/model/FormulaObjects/textanddataFunctions.js
View file @
2f686fce
...
...
@@ -356,16 +356,12 @@ cDOLLAR.prototype.Calculate = function ( arg ) {
return
Math
[
n
>
0
?
"
floor
"
:
"
ceil
"
](
n
);
}
function
sign
(
n
)
{
return
n
==
0
?
0
:
n
<
0
?
-
1
:
1
}
function
Floor
(
number
,
significance
)
{
var
quotient
=
number
/
significance
;
if
(
quotient
==
0
)
{
return
0
;
}
var
nolpiat
=
5
*
sign
(
quotient
)
*
Math
.
pow
(
10
,
Math
.
floor
(
Math
.
log10
(
Math
.
abs
(
quotient
)
)
)
-
AscCommonExcel
.
cExcelSignificantDigits
);
var
nolpiat
=
5
*
Math
.
sign
(
quotient
)
*
Math
.
pow
(
10
,
Math
.
floor
(
Math
.
log10
(
Math
.
abs
(
quotient
)
)
)
-
AscCommonExcel
.
cExcelSignificantDigits
);
return
truncate
(
quotient
+
nolpiat
)
*
significance
;
}
...
...
@@ -703,16 +699,12 @@ cFIXED.prototype.Calculate = function ( arg ) {
return
Math
[
n
>
0
?
"
floor
"
:
"
ceil
"
](
n
);
}
function
sign
(
n
)
{
return
n
==
0
?
0
:
n
<
0
?
-
1
:
1
}
function
Floor
(
number
,
significance
)
{
var
quotient
=
number
/
significance
;
if
(
quotient
==
0
)
{
return
0
;
}
var
nolpiat
=
5
*
sign
(
quotient
)
*
Math
.
pow
(
10
,
Math
.
floor
(
Math
.
log10
(
Math
.
abs
(
quotient
)
)
)
-
AscCommonExcel
.
cExcelSignificantDigits
);
var
nolpiat
=
5
*
Math
.
sign
(
quotient
)
*
Math
.
pow
(
10
,
Math
.
floor
(
Math
.
log10
(
Math
.
abs
(
quotient
)
)
)
-
AscCommonExcel
.
cExcelSignificantDigits
);
return
truncate
(
quotient
+
nolpiat
)
*
significance
;
}
...
...
cell/view/EventsController.js
View file @
2f686fce
...
...
@@ -1547,23 +1547,42 @@
return
true
;
}
var
delta
=
0
;
var
self
=
this
;
var
deltaX
=
0
,
deltaY
=
0
;
if
(
undefined
!==
event
.
wheelDelta
&&
0
!==
event
.
wheelDelta
)
{
delta
=
-
1
*
event
.
wheelDelta
/
40
;
}
else
if
(
undefined
!=
event
.
detail
&&
0
!==
event
.
detail
)
{
// FF
delta
=
event
.
detail
;
}
else
if
(
undefined
!=
event
.
deltaY
&&
0
!==
event
.
deltaY
)
{
deltaY
=
-
1
*
event
.
wheelDelta
/
40
;
}
else
if
(
undefined
!==
event
.
detail
&&
0
!==
event
.
detail
)
{
// FF
delta
=
event
.
deltaY
;
deltaY
=
event
.
detail
;
}
if
(
event
.
axis
!==
undefined
&&
event
.
axis
===
event
.
HORIZONTAL_AXIS
)
{
deltaX
=
deltaY
;
deltaY
=
0
;
}
if
(
undefined
!==
event
.
wheelDeltaX
&&
0
!==
event
.
wheelDeltaX
)
{
// Webkit
deltaX
=
-
1
*
event
.
wheelDeltaX
/
40
;
}
if
(
undefined
!==
event
.
wheelDeltaY
&&
0
!==
event
.
wheelDeltaY
)
{
// Webkit
deltaY
=
-
1
*
event
.
wheelDeltaY
/
40
;
}
if
(
event
.
shiftKey
)
{
deltaX
=
deltaY
;
deltaY
=
0
;
}
delta
/=
3
;
var
self
=
this
;
delta
*=
event
.
shiftKey
?
1
:
this
.
settings
.
wheelScrollLines
;
this
.
handlers
.
trigger
(
"
updateWorksheet
"
,
this
.
element
,
/*x*/
undefined
,
/*y*/
undefined
,
/*ctrlKey*/
undefined
,
function
()
{
event
.
shiftKey
?
self
.
scrollHorizontal
(
delta
,
event
)
:
self
.
scrollVertical
(
delta
,
event
);
if
(
deltaX
)
{
deltaX
=
Math
.
sign
(
deltaX
)
*
Math
.
ceil
(
Math
.
abs
(
deltaX
/
3
));
self
.
scrollHorizontal
(
deltaX
,
event
);
}
if
(
deltaY
)
{
deltaY
=
Math
.
sign
(
deltaY
)
*
Math
.
ceil
(
Math
.
abs
(
deltaY
*
self
.
settings
.
wheelScrollLines
/
3
));
self
.
scrollVertical
(
deltaY
,
event
);
}
self
.
_onMouseMove
(
event
);
});
return
true
;
...
...
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