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
e2a1b568
Commit
e2a1b568
authored
Apr 06, 2016
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
правка редактирования с линейками
parent
356943b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
17 deletions
+28
-17
slide/apiExport.js
slide/apiExport.js
+1
-0
word/Drawing/Rulers.js
word/Drawing/Rulers.js
+26
-17
word/apiExport.js
word/apiExport.js
+1
-0
No files found.
slide/apiExport.js
View file @
e2a1b568
...
...
@@ -325,6 +325,7 @@ asc_docs_api.prototype['asc_SetDocumentPlaceChangedEnabled'] = asc_docs_api.prot
asc_docs_api
.
prototype
[
'
asc_SetViewRulers
'
]
=
asc_docs_api
.
prototype
.
asc_SetViewRulers
;
asc_docs_api
.
prototype
[
'
asc_SetViewRulersChange
'
]
=
asc_docs_api
.
prototype
.
asc_SetViewRulersChange
;
asc_docs_api
.
prototype
[
'
asc_GetViewRulers
'
]
=
asc_docs_api
.
prototype
.
asc_GetViewRulers
;
asc_docs_api
.
prototype
[
'
asc_SetDocumentUnits
'
]
=
asc_docs_api
.
prototype
.
asc_SetDocumentUnits
;
asc_docs_api
.
prototype
[
'
SetMobileVersion
'
]
=
asc_docs_api
.
prototype
.
SetMobileVersion
;
asc_docs_api
.
prototype
[
'
GoToHeader
'
]
=
asc_docs_api
.
prototype
.
GoToHeader
;
asc_docs_api
.
prototype
[
'
changeSlideSize
'
]
=
asc_docs_api
.
prototype
.
changeSlideSize
;
...
...
word/Drawing/Rulers.js
View file @
e2a1b568
...
...
@@ -97,11 +97,20 @@ function CVerRulerRepaintChecker()
this
.
BlitTop
=
0
;
}
function
RulerCorrectPosition
(
val
,
mm_1_8
,
mm_1_4
,
margin
)
function
RulerCorrectPosition
(
_ruler
,
val
,
margin
)
{
if
(
global_keyboardEvent
.
AltKey
)
return
val
;
var
mm_1_4
=
10
/
4
;
if
(
_ruler
.
Units
==
c_oAscDocumentUnits
.
Inch
)
mm_1_4
=
25.4
/
16
;
else
if
(
_ruler
.
Units
==
c_oAscDocumentUnits
.
Point
)
mm_1_4
=
25.4
/
12
;
var
mm_1_8
=
mm_1_4
/
2
;
if
(
undefined
===
margin
)
return
(((
val
+
mm_1_8
)
/
mm_1_4
)
>>
0
)
*
mm_1_4
;
...
...
@@ -1107,7 +1116,7 @@ function CHorRuler()
}
case
1
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
_margin_left
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
_margin_left
);
if
(
newVal
<
0
)
newVal
=
0
;
...
...
@@ -1133,7 +1142,7 @@ function CHorRuler()
}
case
2
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
_margin_left
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
_margin_left
);
var
min
=
this
.
m_dMarginLeft
;
if
((
this
.
m_dMarginLeft
+
this
.
m_dIndentLeft
)
>
min
)
...
...
@@ -1161,7 +1170,7 @@ function CHorRuler()
}
case
3
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
_margin_left
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
_margin_left
);
var
min
=
0
;
if
(
this
.
m_dIndentLeftFirst
<
this
.
m_dIndentLeft
)
...
...
@@ -1202,7 +1211,7 @@ function CHorRuler()
}
case
4
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
_margin_left
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
_margin_left
);
if
(
newVal
<
0
)
newVal
=
0
;
...
...
@@ -1230,7 +1239,7 @@ function CHorRuler()
}
case
5
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
_margin_left
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
_margin_left
);
if
(
newVal
<
0
)
newVal
=
0
;
...
...
@@ -1258,7 +1267,7 @@ function CHorRuler()
}
case
6
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
_margin_left
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
_margin_left
);
if
(
newVal
>
(
this
.
m_oPage
.
width_mm
))
newVal
=
this
.
m_oPage
.
width_mm
;
...
...
@@ -1290,7 +1299,7 @@ function CHorRuler()
}
case
7
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
_margin_left
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
_margin_left
);
this
.
m_dCurrentTabNewPosition
=
newVal
-
_margin_left
;
...
...
@@ -1314,7 +1323,7 @@ function CHorRuler()
}
case
8
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
this
.
TableMarginLeftTrackStart
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
this
.
TableMarginLeftTrackStart
);
// сначала определим граничные условия
var
_min
=
0
;
...
...
@@ -1359,7 +1368,7 @@ function CHorRuler()
}
case
9
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
this
.
TableMarginLeftTrackStart
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
this
.
TableMarginLeftTrackStart
);
// сначала определим граничные условия
var
markup
=
this
.
m_oColumnMarkup
;
...
...
@@ -1508,7 +1517,7 @@ function CHorRuler()
}
case
10
:
{
var
newVal
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
this
.
TableMarginLeftTrackStart
);
var
newVal
=
RulerCorrectPosition
(
this
,
_x
,
this
.
TableMarginLeftTrackStart
);
// сначала определим граничные условия
var
markup
=
this
.
m_oColumnMarkup
;
...
...
@@ -1964,7 +1973,7 @@ function CHorRuler()
var
mm_1_4
=
10
/
4
;
var
mm_1_8
=
mm_1_4
/
2
;
var
_new_tab_pos
=
RulerCorrectPosition
(
_x
,
mm_1_8
,
mm_1_4
,
_margin_left
);
var
_new_tab_pos
=
RulerCorrectPosition
(
this
,
_x
,
_margin_left
);
_new_tab_pos
-=
_margin_left
;
this
.
m_arrTabs
[
this
.
m_arrTabs
.
length
]
=
new
CTab
(
_new_tab_pos
,
word_control
.
m_nTabsType
);
...
...
@@ -3246,7 +3255,7 @@ function CVerRuler()
}
case
1
:
{
var
newVal
=
RulerCorrectPosition
(
_y
,
mm_1_8
,
mm_1_4
,
this
.
m_dMarginTop
);
var
newVal
=
RulerCorrectPosition
(
this
,
_y
,
this
.
m_dMarginTop
);
if
(
newVal
>
(
this
.
m_dMarginBottom
-
30
))
newVal
=
this
.
m_dMarginBottom
-
30
;
...
...
@@ -3265,7 +3274,7 @@ function CVerRuler()
}
case
2
:
{
var
newVal
=
RulerCorrectPosition
(
_y
,
mm_1_8
,
mm_1_4
,
this
.
m_dMarginTop
);
var
newVal
=
RulerCorrectPosition
(
this
,
_y
,
this
.
m_dMarginTop
);
if
(
newVal
<
(
this
.
m_dMarginTop
+
30
))
newVal
=
this
.
m_dMarginTop
+
30
;
...
...
@@ -3284,7 +3293,7 @@ function CVerRuler()
}
case
3
:
{
var
newVal
=
RulerCorrectPosition
(
_y
,
mm_1_8
,
mm_1_4
,
this
.
m_dMarginTop
);
var
newVal
=
RulerCorrectPosition
(
this
,
_y
,
this
.
m_dMarginTop
);
if
(
newVal
>
this
.
header_bottom
)
newVal
=
this
.
header_bottom
;
...
...
@@ -3303,7 +3312,7 @@ function CVerRuler()
}
case
4
:
{
var
newVal
=
RulerCorrectPosition
(
_y
,
mm_1_8
,
mm_1_4
,
this
.
m_dMarginTop
);
var
newVal
=
RulerCorrectPosition
(
this
,
_y
,
this
.
m_dMarginTop
);
if
(
newVal
<
0
)
newVal
=
0
;
...
...
@@ -3335,7 +3344,7 @@ function CVerRuler()
_max
=
this
.
m_oTableMarkup
.
Rows
[
this
.
DragTablePos
].
Y
+
this
.
m_oTableMarkup
.
Rows
[
this
.
DragTablePos
].
H
;
}
var
newVal
=
RulerCorrectPosition
(
_y
,
mm_1_8
,
mm_1_4
,
this
.
m_dMarginTop
);
var
newVal
=
RulerCorrectPosition
(
this
,
_y
,
this
.
m_dMarginTop
);
if
(
newVal
<
_min
)
newVal
=
_min
;
...
...
word/apiExport.js
View file @
e2a1b568
...
...
@@ -463,6 +463,7 @@ asc_docs_api.prototype['asc_SetDocumentPlaceChangedEnabled'] = asc_docs_api.prot
asc_docs_api
.
prototype
[
'
asc_SetViewRulers
'
]
=
asc_docs_api
.
prototype
.
asc_SetViewRulers
;
asc_docs_api
.
prototype
[
'
asc_SetViewRulersChange
'
]
=
asc_docs_api
.
prototype
.
asc_SetViewRulersChange
;
asc_docs_api
.
prototype
[
'
asc_GetViewRulers
'
]
=
asc_docs_api
.
prototype
.
asc_GetViewRulers
;
asc_docs_api
.
prototype
[
'
asc_SetDocumentUnits
'
]
=
asc_docs_api
.
prototype
.
asc_SetDocumentUnits
;
asc_docs_api
.
prototype
[
'
SetMobileVersion
'
]
=
asc_docs_api
.
prototype
.
SetMobileVersion
;
asc_docs_api
.
prototype
[
'
GoToHeader
'
]
=
asc_docs_api
.
prototype
.
GoToHeader
;
asc_docs_api
.
prototype
[
'
GoToFooter
'
]
=
asc_docs_api
.
prototype
.
GoToFooter
;
...
...
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