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
f39ee7dc
Commit
f39ee7dc
authored
Dec 02, 2016
by
Oleg Korshul
Committed by
GitHub
Dec 02, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #85 from ONLYOFFICE/release/v4.2.0
Release/v4.2.0
parents
9bbdb104
755d0f55
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
77 additions
and
30 deletions
+77
-30
cell/api.js
cell/api.js
+1
-0
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+3
-0
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+3
-2
common/browser.js
common/browser.js
+47
-17
common/docscoapi.js
common/docscoapi.js
+11
-2
common/docscoapicommon.js
common/docscoapicommon.js
+1
-1
slide/Editor/Format/Layout.js
slide/Editor/Format/Layout.js
+2
-7
slide/Editor/Format/SlideMaster.js
slide/Editor/Format/SlideMaster.js
+1
-1
slide/api.js
slide/api.js
+1
-0
word/Editor/GraphicObjects/GraphicObjects.js
word/Editor/GraphicObjects/GraphicObjects.js
+6
-0
word/api.js
word/api.js
+1
-0
No files found.
cell/api.js
View file @
f39ee7dc
...
@@ -3659,6 +3659,7 @@ var editor;
...
@@ -3659,6 +3659,7 @@ var editor;
prot
[
"
asc_pluginButtonClick
"
]
=
prot
.
asc_pluginButtonClick
;
prot
[
"
asc_pluginButtonClick
"
]
=
prot
.
asc_pluginButtonClick
;
prot
[
"
asc_addOleObject
"
]
=
prot
.
asc_addOleObject
;
prot
[
"
asc_addOleObject
"
]
=
prot
.
asc_addOleObject
;
prot
[
"
asc_editOleObject
"
]
=
prot
.
asc_editOleObject
;
prot
[
"
asc_editOleObject
"
]
=
prot
.
asc_editOleObject
;
prot
[
"
asc_startEditCurrentOleObject
"
]
=
prot
.
asc_startEditCurrentOleObject
;
prot
[
"
asc_pluginEnableMouseEvents
"
]
=
prot
.
asc_pluginEnableMouseEvents
;
prot
[
"
asc_pluginEnableMouseEvents
"
]
=
prot
.
asc_pluginEnableMouseEvents
;
// system input
// system input
...
...
cell/view/WorkbookView.js
View file @
f39ee7dc
...
@@ -1757,6 +1757,9 @@
...
@@ -1757,6 +1757,9 @@
if
(
isRetina
)
{
if
(
isRetina
)
{
this
.
canvas
.
style
.
width
=
this
.
canvasOverlay
.
style
.
width
=
this
.
canvasGraphic
.
style
.
width
=
this
.
canvasGraphicOverlay
.
style
.
width
=
styleWidth
+
'
px
'
;
this
.
canvas
.
style
.
width
=
this
.
canvasOverlay
.
style
.
width
=
this
.
canvasGraphic
.
style
.
width
=
this
.
canvasGraphicOverlay
.
style
.
width
=
styleWidth
+
'
px
'
;
this
.
canvas
.
style
.
height
=
this
.
canvasOverlay
.
style
.
height
=
this
.
canvasGraphic
.
style
.
height
=
this
.
canvasGraphicOverlay
.
style
.
height
=
styleHeight
+
'
px
'
;
this
.
canvas
.
style
.
height
=
this
.
canvasOverlay
.
style
.
height
=
this
.
canvasGraphic
.
style
.
height
=
this
.
canvasGraphicOverlay
.
style
.
height
=
styleHeight
+
'
px
'
;
}
else
{
this
.
canvas
.
style
.
width
=
this
.
canvasOverlay
.
style
.
width
=
this
.
canvasGraphic
.
style
.
width
=
this
.
canvasGraphicOverlay
.
style
.
width
=
width
+
'
px
'
;
this
.
canvas
.
style
.
height
=
this
.
canvasOverlay
.
style
.
height
=
this
.
canvasGraphic
.
style
.
height
=
this
.
canvasGraphicOverlay
.
style
.
height
=
height
+
'
px
'
;
}
}
// При смене ориентации у планшета, сбрасываются флаги у canvas!
// При смене ориентации у планшета, сбрасываются флаги у canvas!
...
...
common/Drawings/CommonController.js
View file @
f39ee7dc
...
@@ -8237,7 +8237,7 @@ DrawingObjectsController.prototype =
...
@@ -8237,7 +8237,7 @@ DrawingObjectsController.prototype =
{
{
this
.
selection
.
groupSelection
.
bringToFront
();
this
.
selection
.
groupSelection
.
bringToFront
();
}
}
this
.
drawingObjects
.
showDrawingObjects
(
true
);
},
},
bringForward
:
function
()
bringForward
:
function
()
...
@@ -8284,7 +8284,7 @@ DrawingObjectsController.prototype =
...
@@ -8284,7 +8284,7 @@ DrawingObjectsController.prototype =
{
{
this
.
selection
.
groupSelection
.
sendToBack
();
this
.
selection
.
groupSelection
.
sendToBack
();
}
}
this
.
drawingObjects
.
showDrawingObjects
(
true
);
},
},
...
@@ -8307,6 +8307,7 @@ DrawingObjectsController.prototype =
...
@@ -8307,6 +8307,7 @@ DrawingObjectsController.prototype =
{
{
this
.
selection
.
groupSelection
.
bringBackward
();
this
.
selection
.
groupSelection
.
bringBackward
();
}
}
this
.
drawingObjects
.
showDrawingObjects
(
true
);
}
}
};
};
...
...
common/browser.js
View file @
f39ee7dc
...
@@ -121,26 +121,56 @@ AscBrowser.checkZoom = function()
...
@@ -121,26 +121,56 @@ AscBrowser.checkZoom = function()
if
(
AscBrowser
.
isChrome
&&
!
AscBrowser
.
isOpera
&&
document
&&
document
.
firstElementChild
&&
document
.
body
)
if
(
AscBrowser
.
isChrome
&&
!
AscBrowser
.
isOpera
&&
document
&&
document
.
firstElementChild
&&
document
.
body
)
{
{
if
(
window
.
innerWidth
>
300
)
if
(
false
)
AscBrowser
.
zoom
=
window
.
outerWidth
/
window
.
innerWidth
;
{
// этот код - рабочий, но только если этот ифрейм открыт на весь размер браузера
if
(
Math
.
abs
(
AscBrowser
.
zoom
-
1
)
<
0.1
)
// (window.outerWidth и window.innerWidth зависимы)
AscBrowser
.
zoom
=
1
;
if
(
window
.
innerWidth
>
300
)
AscBrowser
.
zoom
=
window
.
outerWidth
/
window
.
innerWidth
;
AscBrowser
.
zoom
=
window
.
outerWidth
/
window
.
innerWidth
;
var
_devicePixelRatio
=
window
.
devicePixelRatio
/
AscBrowser
.
zoom
;
if
(
Math
.
abs
(
AscBrowser
.
zoom
-
1
)
<
0.1
)
AscBrowser
.
zoom
=
1
;
// device pixel ratio: кратно 0.5
AscBrowser
.
zoom
=
window
.
outerWidth
/
window
.
innerWidth
;
_devicePixelRatio
=
(
5
*
(((
2.5
+
10
*
_devicePixelRatio
)
/
5
)
>>
0
))
/
10
;
AscBrowser
.
zoom
=
window
.
devicePixelRatio
/
_devicePixelRatio
;
if
(
2
==
_devicePixelRatio
)
AscBrowser
.
isRetina
=
true
;
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
var
_devicePixelRatio
=
window
.
devicePixelRatio
/
AscBrowser
.
zoom
;
//document.firstElementChild.style.zoom = "reset";
document
.
firstElementChild
.
style
.
zoom
=
1.0
/
AscBrowser
.
zoom
;
// device pixel ratio: кратно 0.5
_devicePixelRatio
=
(
5
*
(((
2.5
+
10
*
_devicePixelRatio
)
/
5
)
>>
0
))
/
10
;
AscBrowser
.
zoom
=
window
.
devicePixelRatio
/
_devicePixelRatio
;
if
(
2
==
_devicePixelRatio
)
AscBrowser
.
isRetina
=
true
;
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
//document.firstElementChild.style.zoom = "reset";
document
.
firstElementChild
.
style
.
zoom
=
1.0
/
AscBrowser
.
zoom
;
}
else
{
// делаем простую проверку
// считаем: 0 < window.devicePixelRatio < 2 => _devicePixelRatio = 1; zoom = window.devicePixelRatio / _devicePixelRatio;
// считаем: window.devicePixelRatio >= 2 => _devicePixelRatio = 2; zoom = window.devicePixelRatio / _devicePixelRatio;
if
(
window
.
devicePixelRatio
>
0.1
)
{
if
(
window
.
devicePixelRatio
<
1.99
)
{
var
_devicePixelRatio
=
1
;
AscBrowser
.
zoom
=
window
.
devicePixelRatio
/
_devicePixelRatio
;
}
else
{
var
_devicePixelRatio
=
2
;
AscBrowser
.
zoom
=
window
.
devicePixelRatio
/
_devicePixelRatio
;
AscBrowser
.
isRetina
=
true
;
}
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
//document.firstElementChild.style.zoom = "reset";
document
.
firstElementChild
.
style
.
zoom
=
1.0
/
AscBrowser
.
zoom
;
}
else
document
.
firstElementChild
.
style
.
zoom
=
"
normal
"
;
}
}
}
else
else
{
{
...
...
common/docscoapi.js
View file @
f39ee7dc
...
@@ -632,7 +632,7 @@
...
@@ -632,7 +632,7 @@
};
};
DocsCoApi
.
prototype
.
askLock
=
function
(
arrayBlockId
,
callback
)
{
DocsCoApi
.
prototype
.
askLock
=
function
(
arrayBlockId
,
callback
)
{
if
(
ConnectionState
.
SaveChanges
===
this
.
_state
)
{
if
(
ConnectionState
.
SaveChanges
===
this
.
_state
||
ConnectionState
.
AskSaveChanges
===
this
.
_state
)
{
// Мы в режиме сохранения. Lock-и запросим после окончания.
// Мы в режиме сохранения. Lock-и запросим после окончания.
this
.
_lockBuffer
.
push
(
new
LockBufferElement
(
arrayBlockId
,
callback
));
this
.
_lockBuffer
.
push
(
new
LockBufferElement
(
arrayBlockId
,
callback
));
return
;
return
;
...
@@ -722,9 +722,13 @@
...
@@ -722,9 +722,13 @@
t
.
_saveCallback
[
indexCallback
]
=
null
;
t
.
_saveCallback
[
indexCallback
]
=
null
;
//Not signaled already
//Not signaled already
oTmpCallback
({
error
:
"
Timed out
"
});
oTmpCallback
({
error
:
"
Timed out
"
});
t
.
_state
=
ConnectionState
.
Authorized
;
// Делаем отложенные lock-и
t
.
_sendBufferedLocks
();
}
}
},
this
.
errorTimeOut
);
},
this
.
errorTimeOut
);
}
}
this
.
_state
=
ConnectionState
.
AskSaveChanges
;
this
.
_send
({
"
type
"
:
"
isSaveLock
"
});
this
.
_send
({
"
type
"
:
"
isSaveLock
"
});
};
};
...
@@ -1025,7 +1029,7 @@
...
@@ -1025,7 +1029,7 @@
};
};
DocsCoApi
.
prototype
.
_onSaveLock
=
function
(
data
)
{
DocsCoApi
.
prototype
.
_onSaveLock
=
function
(
data
)
{
if
(
undefined
!=
data
[
"
saveLock
"
]
&&
null
!=
data
[
"
saveLock
"
])
{
if
(
null
!=
data
[
"
saveLock
"
])
{
var
indexCallback
=
this
.
_saveCallback
.
length
-
1
;
var
indexCallback
=
this
.
_saveCallback
.
length
-
1
;
var
oTmpCallback
=
this
.
_saveCallback
[
indexCallback
];
var
oTmpCallback
=
this
.
_saveCallback
[
indexCallback
];
if
(
oTmpCallback
)
{
if
(
oTmpCallback
)
{
...
@@ -1037,6 +1041,11 @@
...
@@ -1037,6 +1041,11 @@
this
.
_saveCallback
[
indexCallback
]
=
null
;
this
.
_saveCallback
[
indexCallback
]
=
null
;
oTmpCallback
(
data
);
oTmpCallback
(
data
);
if
(
data
[
'
error
'
])
{
this
.
_state
=
ConnectionState
.
Authorized
;
// Делаем отложенные lock-и
this
.
_sendBufferedLocks
();
}
}
}
}
}
};
};
...
...
common/docscoapicommon.js
View file @
f39ee7dc
This diff is collapsed.
Click to expand it.
slide/Editor/Format/Layout.js
View file @
f39ee7dc
...
@@ -518,7 +518,7 @@ SlideLayout.prototype =
...
@@ -518,7 +518,7 @@ SlideLayout.prototype =
var
_shape_count
=
_shapes
.
length
;
var
_shape_count
=
_shapes
.
length
;
for
(
_shape_index
=
0
;
_shape_index
<
_shape_count
;
++
_shape_index
)
for
(
_shape_index
=
0
;
_shape_index
<
_shape_count
;
++
_shape_index
)
{
{
if
(
_shapes
[
_shape_index
].
isPlaceholder
())
if
(
_shapes
[
_shape_index
].
isPlaceholder
&&
_shapes
[
_shape_index
].
isPlaceholder
())
_shapes
[
_shape_index
].
recalculate
();
_shapes
[
_shape_index
].
recalculate
();
}
}
},
},
...
@@ -891,12 +891,7 @@ function CLayoutThumbnailDrawer()
...
@@ -891,12 +891,7 @@ function CLayoutThumbnailDrawer()
for
(
var
i
=
0
;
i
<
_layout
.
cSld
.
spTree
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
_layout
.
cSld
.
spTree
.
length
;
i
++
)
{
{
var
_sp_elem
=
_layout
.
cSld
.
spTree
[
i
];
var
_sp_elem
=
_layout
.
cSld
.
spTree
[
i
];
/*if (!_sp_elem.isPlaceholder())
if
(
_sp_elem
.
isPlaceholder
&&
_sp_elem
.
isPlaceholder
())
{
if (use_layout_shapes !== false)
_sp_elem.draw(g);
}
else*/
{
{
var
_ph_type
=
_sp_elem
.
getPlaceholderType
();
var
_ph_type
=
_sp_elem
.
getPlaceholderType
();
var
_usePH
=
true
;
var
_usePH
=
true
;
...
...
slide/Editor/Format/SlideMaster.js
View file @
f39ee7dc
...
@@ -352,7 +352,7 @@ MasterSlide.prototype =
...
@@ -352,7 +352,7 @@ MasterSlide.prototype =
{
{
for
(
var
i
=
0
;
i
<
this
.
cSld
.
spTree
.
length
;
++
i
)
for
(
var
i
=
0
;
i
<
this
.
cSld
.
spTree
.
length
;
++
i
)
{
{
if
(
!
this
.
cSld
.
spTree
[
i
].
isPlaceholder
())
if
(
this
.
cSld
.
spTree
[
i
].
isPlaceholder
&&
!
this
.
cSld
.
spTree
[
i
].
isPlaceholder
())
this
.
cSld
.
spTree
[
i
].
draw
(
graphics
);
this
.
cSld
.
spTree
[
i
].
draw
(
graphics
);
}
}
},
},
...
...
slide/api.js
View file @
f39ee7dc
...
@@ -6931,6 +6931,7 @@ background-repeat: no-repeat;\
...
@@ -6931,6 +6931,7 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
[
"
asc_addOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_addOleObject
;
asc_docs_api
.
prototype
[
"
asc_addOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_addOleObject
;
asc_docs_api
.
prototype
[
"
asc_editOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_editOleObject
;
asc_docs_api
.
prototype
[
"
asc_editOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_editOleObject
;
asc_docs_api
.
prototype
[
"
asc_startEditCurrentOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_startEditCurrentOleObject
;
asc_docs_api
.
prototype
[
"
asc_InputClearKeyboardElement
"
]
=
asc_docs_api
.
prototype
.
asc_InputClearKeyboardElement
;
asc_docs_api
.
prototype
[
"
asc_InputClearKeyboardElement
"
]
=
asc_docs_api
.
prototype
.
asc_InputClearKeyboardElement
;
asc_docs_api
.
prototype
[
"
asc_getCurrentFocusObject
"
]
=
asc_docs_api
.
prototype
.
asc_getCurrentFocusObject
;
asc_docs_api
.
prototype
[
"
asc_getCurrentFocusObject
"
]
=
asc_docs_api
.
prototype
.
asc_getCurrentFocusObject
;
...
...
word/Editor/GraphicObjects/GraphicObjects.js
View file @
f39ee7dc
...
@@ -742,6 +742,8 @@ CGraphicObjects.prototype =
...
@@ -742,6 +742,8 @@ CGraphicObjects.prototype =
{
{
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Document_GrObjectsBringForwardGroup
);
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Document_GrObjectsBringForwardGroup
);
this
.
selection
.
groupSelection
.
bringForward
();
this
.
selection
.
groupSelection
.
bringForward
();
this
.
document
.
Recalculate
();
this
.
document
.
Document_UpdateUndoRedoState
();
}
}
}
}
else
else
...
@@ -797,6 +799,8 @@ CGraphicObjects.prototype =
...
@@ -797,6 +799,8 @@ CGraphicObjects.prototype =
{
{
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Document_GrObjectsSendToBackGroup
);
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Document_GrObjectsSendToBackGroup
);
this
.
selection
.
groupSelection
.
sendToBack
();
this
.
selection
.
groupSelection
.
sendToBack
();
this
.
document
.
Recalculate
();
this
.
document
.
Document_UpdateUndoRedoState
();
}
}
}
}
else
else
...
@@ -831,6 +835,8 @@ CGraphicObjects.prototype =
...
@@ -831,6 +835,8 @@ CGraphicObjects.prototype =
{
{
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Document_GrObjectsBringBackwardGroup
);
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Document_GrObjectsBringBackwardGroup
);
this
.
selection
.
groupSelection
.
bringBackward
();
this
.
selection
.
groupSelection
.
bringBackward
();
this
.
document
.
Recalculate
();
this
.
document
.
Document_UpdateUndoRedoState
();
}
}
}
}
else
else
...
...
word/api.js
View file @
f39ee7dc
...
@@ -9020,6 +9020,7 @@ background-repeat: no-repeat;\
...
@@ -9020,6 +9020,7 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
[
"
asc_SetSilentMode
"
]
=
asc_docs_api
.
prototype
.
asc_SetSilentMode
;
asc_docs_api
.
prototype
[
"
asc_SetSilentMode
"
]
=
asc_docs_api
.
prototype
.
asc_SetSilentMode
;
asc_docs_api
.
prototype
[
"
asc_addOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_addOleObject
;
asc_docs_api
.
prototype
[
"
asc_addOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_addOleObject
;
asc_docs_api
.
prototype
[
"
asc_editOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_editOleObject
;
asc_docs_api
.
prototype
[
"
asc_editOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_editOleObject
;
asc_docs_api
.
prototype
[
"
asc_startEditCurrentOleObject
"
]
=
asc_docs_api
.
prototype
.
asc_startEditCurrentOleObject
;
asc_docs_api
.
prototype
[
"
asc_InputClearKeyboardElement
"
]
=
asc_docs_api
.
prototype
.
asc_InputClearKeyboardElement
;
asc_docs_api
.
prototype
[
"
asc_InputClearKeyboardElement
"
]
=
asc_docs_api
.
prototype
.
asc_InputClearKeyboardElement
;
// mobile
// mobile
...
...
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