ofd-view 0.1.41 → 0.1.43

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  /******/ (function() { // webpackBootstrap
2
2
  /******/ var __webpack_modules__ = ({
3
3
 
4
- /***/ 218:
4
+ /***/ 911:
5
5
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
6
6
 
7
7
  "use strict";
@@ -15,14 +15,14 @@ __webpack_require__.r(__webpack_exports__);
15
15
 
16
16
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
17
17
  // Module
18
- ___CSS_LOADER_EXPORT___.push([module.id, ".vdr[data-v-eeede7ac]{touch-action:none;position:absolute;box-sizing:border-box;border:1px dashed #ddd;cursor:move}.vdr button[data-v-eeede7ac]{display:none}.vdr[data-v-eeede7ac]:hover{border:1px solid #fd397a;background:rgba(253,57,122,.08)}.vdr:hover button[data-v-eeede7ac]{display:block}.handle[data-v-eeede7ac]{box-sizing:border-box;display:none;position:absolute;width:10px;height:10px;font-size:1px;background:rgba(253,57,122,.08);border:1px solid #fd397a}.handle-tl[data-v-eeede7ac]{top:-10px;left:-10px;cursor:nw-resize}.handle-tm[data-v-eeede7ac]{top:-10px;left:50%;margin-left:-5px;cursor:n-resize}.handle-tr[data-v-eeede7ac]{top:-10px;right:-10px;cursor:ne-resize}.handle-ml[data-v-eeede7ac]{left:-10px;cursor:w-resize}.handle-ml[data-v-eeede7ac],.handle-mr[data-v-eeede7ac]{top:50%;margin-top:-5px}.handle-mr[data-v-eeede7ac]{right:-10px;cursor:e-resize}.handle-bl[data-v-eeede7ac]{bottom:-10px;left:-10px;cursor:sw-resize}.handle-bm[data-v-eeede7ac]{bottom:-10px;left:50%;margin-left:-5px;cursor:s-resize}.handle-br[data-v-eeede7ac]{bottom:-10px;right:-10px;cursor:se-resize}@media only screen and (max-width:768px){[class*=handle-][data-v-eeede7ac]:before{content:\"\";left:-10px;right:-10px;bottom:-10px;top:-10px;position:absolute}}.close[data-v-eeede7ac]{background:orange;color:red;border-radius:12px;line-height:20px;text-align:center;height:20px;width:20px;font-size:18px;padding:1px}.close[data-v-eeede7ac]:before{content:\"\\2716\"}.close[data-v-eeede7ac]{top:5px;right:2px;position:absolute}", ""]);
18
+ ___CSS_LOADER_EXPORT___.push([module.id, ".vdr[data-v-b44a7a5c]{touch-action:none;position:absolute;box-sizing:border-box;border:1px dashed #ddd;cursor:move}.vdr button[data-v-b44a7a5c]{display:none}.vdr[data-v-b44a7a5c]:hover{border:1px solid #fd397a;background:rgba(253,57,122,.08)}.vdr:hover button[data-v-b44a7a5c]{display:block}.handle[data-v-b44a7a5c]{box-sizing:border-box;display:none;position:absolute;width:10px;height:10px;font-size:1px;background:rgba(253,57,122,.08);border:1px solid #fd397a}.handle-tl[data-v-b44a7a5c]{top:-10px;left:-10px;cursor:nw-resize}.handle-tm[data-v-b44a7a5c]{top:-10px;left:50%;margin-left:-5px;cursor:n-resize}.handle-tr[data-v-b44a7a5c]{top:-10px;right:-10px;cursor:ne-resize}.handle-ml[data-v-b44a7a5c]{left:-10px;cursor:w-resize}.handle-ml[data-v-b44a7a5c],.handle-mr[data-v-b44a7a5c]{top:50%;margin-top:-5px}.handle-mr[data-v-b44a7a5c]{right:-10px;cursor:e-resize}.handle-bl[data-v-b44a7a5c]{bottom:-10px;left:-10px;cursor:sw-resize}.handle-bm[data-v-b44a7a5c]{bottom:-10px;left:50%;margin-left:-5px;cursor:s-resize}.handle-br[data-v-b44a7a5c]{bottom:-10px;right:-10px;cursor:se-resize}@media only screen and (max-width:768px){[class*=handle-][data-v-b44a7a5c]:before{content:\"\";left:-10px;right:-10px;bottom:-10px;top:-10px;position:absolute}}.close[data-v-b44a7a5c]{background:orange;color:red;border-radius:12px;line-height:20px;text-align:center;height:20px;width:20px;font-size:18px;padding:1px}.close[data-v-b44a7a5c]:before{content:\"\\2716\"}.close[data-v-b44a7a5c]{top:5px;right:2px;position:absolute}", ""]);
19
19
  // Exports
20
20
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
21
21
 
22
22
 
23
23
  /***/ }),
24
24
 
25
- /***/ 68:
25
+ /***/ 936:
26
26
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27
27
 
28
28
  "use strict";
@@ -36,7 +36,7 @@ __webpack_require__.r(__webpack_exports__);
36
36
 
37
37
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
38
38
  // Module
39
- ___CSS_LOADER_EXPORT___.push([module.id, ".stamp[data-v-7f7c718c]{background-position:50%;background-repeat:no-repeat;background-size:contain;width:100%;height:100%}", ""]);
39
+ ___CSS_LOADER_EXPORT___.push([module.id, ".stamp[data-v-7dfc8129]{background-position:50%;background-repeat:no-repeat;background-size:contain;width:100%;height:100%}", ""]);
40
40
  // Exports
41
41
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
42
42
 
@@ -164,35 +164,35 @@ module.exports = function (i) {
164
164
 
165
165
  /***/ }),
166
166
 
167
- /***/ 56:
167
+ /***/ 141:
168
168
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
169
169
 
170
170
  // style-loader: Adds some css to the DOM by adding a <style> tag
171
171
 
172
172
  // load the styles
173
- var content = __webpack_require__(218);
173
+ var content = __webpack_require__(911);
174
174
  if(content.__esModule) content = content.default;
175
175
  if(typeof content === 'string') content = [[module.id, content, '']];
176
176
  if(content.locals) module.exports = content.locals;
177
177
  // add the styles to the DOM
178
178
  var add = (__webpack_require__(402)/* ["default"] */ .Z)
179
- var update = add("8ce077e8", content, true, {"sourceMap":false,"shadowMode":false});
179
+ var update = add("71f86d50", content, true, {"sourceMap":false,"shadowMode":false});
180
180
 
181
181
  /***/ }),
182
182
 
183
- /***/ 299:
183
+ /***/ 979:
184
184
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
185
185
 
186
186
  // style-loader: Adds some css to the DOM by adding a <style> tag
187
187
 
188
188
  // load the styles
189
- var content = __webpack_require__(68);
189
+ var content = __webpack_require__(936);
190
190
  if(content.__esModule) content = content.default;
191
191
  if(typeof content === 'string') content = [[module.id, content, '']];
192
192
  if(content.locals) module.exports = content.locals;
193
193
  // add the styles to the DOM
194
194
  var add = (__webpack_require__(402)/* ["default"] */ .Z)
195
- var update = add("217c5eb8", content, true, {"sourceMap":false,"shadowMode":false});
195
+ var update = add("0ff97a64", content, true, {"sourceMap":false,"shadowMode":false});
196
196
 
197
197
  /***/ }),
198
198
 
@@ -564,21 +564,21 @@ if (typeof window !== 'undefined') {
564
564
  // Indicate to webpack that this file can be concatenated
565
565
  /* harmony default export */ var setPublicPath = (null);
566
566
 
567
- ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ofdView/src/index.vue?vue&type=template&id=7f7c718c&scoped=true&
567
+ ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ofdView/src/index.vue?vue&type=template&id=7dfc8129&scoped=true&
568
568
  var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{"id":"outerContainer"}},[_vm._m(0),_vm._v(" "),_c('div',{attrs:{"id":"mainContainer"}},[_vm._m(1),_vm._v(" "),_vm._m(2),_c('div',{attrs:{"id":"viewerContainer","tabindex":"0"}},[_c('div',{staticClass:"pdfViewer",attrs:{"id":"viewer"},on:{"dragover":function($event){$event.preventDefault();return _vm.onStampDragOver.apply(null, arguments)}}},_vm._l((_vm.stamps),function(stamp,index){return (_vm.viewVisible)?_c('vue-draggable-resizable',{attrs:{"w":stamp.w ? stamp.w : 174,"h":stamp.h ? stamp.h : 174,"parent":_vm.config.viewerContainer,"customForStamp":true,"eventBus":_vm.eventBus,"handles":['tl', 'tr', 'bl', 'br'],"index":index,"x":stamp.x,"y":stamp.located ? stamp.y : stamp.y + _vm.config.mainContainer.scrollTop,"pages":_vm.ofdViewer._pages,"currentPage":_vm.sp,"origin-bottom":false,"stampId":stamp.source.stampId,"draggable":_vm.draggable,"resizable":_vm.resizable,"editable":_vm.editable},on:{"dropitem":_vm.removeStamp,"dragstop":_vm.onStampDragStop,"placed":_vm.placed}},[_c('div',{staticClass:"stamp",style:({backgroundImage : 'url(data:image/png;base64,' + stamp.source.stampBase64 + ')'})})]):_vm._e()}),1),_vm._t("openFileRef")],2),_vm._m(3)]),_vm._v(" "),_vm._m(4)])
569
569
  }
570
- var staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{"id":"sidebarContainer"}},[_c('div',{attrs:{"id":"toolbarSidebar"}},[_c('div',{attrs:{"id":"toolbarSidebarLeft"}},[_c('div',{staticClass:"splitToolbarButton toggled",attrs:{"id":"sidebarViewButtons","role":"radiogroup"}})]),_c('div',{attrs:{"id":"toolbarSidebarRight"}},[_c('div',{staticClass:"hidden",attrs:{"id":"outlineOptionsContainer"}},[_c('div',{staticClass:"verticalToolbarSeparator"}),_c('button',{staticClass:"toolbarButton",attrs:{"id":"currentOutlineItem","disabled":"disabled","title":"Find Current Outline Item","tabindex":"6","data-l10n-id":"current_outline_item"}},[_c('span',{attrs:{"data-l10n-id":"current_outline_item_label"}},[_vm._v("Current Outline Item")])])])])]),_c('div',{attrs:{"id":"sidebarContent"}},[_c('div',{attrs:{"id":"signaturesView"}})]),_c('div',{attrs:{"id":"sidebarResizer"}})])
571
- },function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"secondaryToolbar hidden doorHangerRight",attrs:{"id":"secondaryToolbar"}},[_c('div',{attrs:{"id":"secondaryToolbarButtonContainer"}},[_c('button',{staticClass:"secondaryToolbarButton openFile visibleLargeView",attrs:{"id":"secondaryOpenFile","title":"打开文件","tabindex":"52","data-l10n-id":"open_file"}},[_c('span',{attrs:{"data-l10n-id":"open_file_label"}},[_vm._v("打开")])]),_c('button',{staticClass:"secondaryToolbarButton print visibleMediumView",attrs:{"id":"secondaryPrint","title":"打印","tabindex":"53","data-l10n-id":"print"}},[_c('span',{attrs:{"data-l10n-id":"print_label"}},[_vm._v("打印")])]),_c('button',{staticClass:"secondaryToolbarButton documentProperties",attrs:{"id":"documentProperties","title":"文档属性…","tabindex":"69","data-l10n-id":"document_properties","aria-controls":"documentPropertiesDialog"}},[_c('span',{attrs:{"data-l10n-id":"document_properties_label"}},[_vm._v("文档属性…")])])])])
570
+ var staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{"id":"sidebarContainer"}},[_c('div',{attrs:{"id":"toolbarSidebar"}},[_c('div',{attrs:{"id":"toolbarSidebarLeft"}},[_c('div',{staticClass:"splitToolbarButton toggled",attrs:{"id":"sidebarViewButtons","role":"radiogroup"}},[_c('button',{staticClass:"toolbarButton",attrs:{"id":"viewAttachments","title":"Show Attachments","tabindex":"4","data-l10n-id":"attachments","role":"radio","aria-checked":"false","aria-controls":"attachmentsView"}},[_c('span',{attrs:{"data-l10n-id":"attachments_label"}},[_vm._v("Attachments")])]),_c('button',{staticClass:"toolbarButton",attrs:{"id":"viewSignatures","title":"Show Signatures","tabindex":"6","data-l10n-id":"layers","role":"radio","aria-checked":"false","aria-controls":"signaturesView"}},[_c('span',{attrs:{"data-l10n-id":"signatures_label"}},[_vm._v("Signatures")])])])]),_c('div',{attrs:{"id":"toolbarSidebarRight"}},[_c('div',{staticClass:"hidden",attrs:{"id":"outlineOptionsContainer"}},[_c('div',{staticClass:"verticalToolbarSeparator"}),_c('button',{staticClass:"toolbarButton",attrs:{"id":"currentOutlineItem","disabled":"disabled","title":"Find Current Outline Item","tabindex":"6","data-l10n-id":"current_outline_item"}},[_c('span',{attrs:{"data-l10n-id":"current_outline_item_label"}},[_vm._v("Current Outline Item")])])])])]),_c('div',{attrs:{"id":"sidebarContent"}},[_c('div',{attrs:{"id":"attachmentsView"}}),_c('div',{staticClass:"hidden",attrs:{"id":"signaturesView"}})]),_c('div',{attrs:{"id":"sidebarResizer"}})])
571
+ },function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"secondaryToolbar hidden doorHangerRight",attrs:{"id":"secondaryToolbar"}},[_c('div',{attrs:{"id":"secondaryToolbarButtonContainer"}},[_c('button',{staticClass:"secondaryToolbarButton openFile visibleLargeView",attrs:{"id":"secondaryOpenFile","title":"打开文件","tabindex":"52","data-l10n-id":"open_file"}},[_c('span',{attrs:{"data-l10n-id":"open_file_label"}},[_vm._v("打开")])]),_c('button',{staticClass:"secondaryToolbarButton print visibleMediumView",attrs:{"id":"secondaryPrint","title":"打印","tabindex":"53","data-l10n-id":"print"}},[_c('span',{attrs:{"data-l10n-id":"print_label"}},[_vm._v("打印")])]),_c('button',{staticClass:"secondaryToolbarButton download visibleMediumView",attrs:{"id":"secondaryDownload","title":"Download","tabindex":"54","data-l10n-id":"download"}},[_c('span',{attrs:{"data-l10n-id":"download_label"}},[_vm._v("Download")])]),_c('a',{staticClass:"secondaryToolbarButton bookmark visibleSmallView",attrs:{"href":"#","id":"secondaryViewBookmark","title":"Current view (copy or open in new window)","tabindex":"55","data-l10n-id":"bookmark"}},[_c('span',{attrs:{"data-l10n-id":"bookmark_label"}},[_vm._v("Current View")])]),_c('div',{staticClass:"horizontalToolbarSeparator visibleLargeView"}),_c('button',{staticClass:"secondaryToolbarButton firstPage",attrs:{"id":"firstPage","title":"Go to First Page","tabindex":"56","data-l10n-id":"first_page"}},[_c('span',{attrs:{"data-l10n-id":"first_page_label"}},[_vm._v("Go to First Page")])]),_c('button',{staticClass:"secondaryToolbarButton lastPage",attrs:{"id":"lastPage","title":"Go to Last Page","tabindex":"57","data-l10n-id":"last_page"}},[_c('span',{attrs:{"data-l10n-id":"last_page_label"}},[_vm._v("Go to Last Page")])]),_c('div',{staticClass:"horizontalToolbarSeparator"}),_c('button',{staticClass:"secondaryToolbarButton rotateCw",attrs:{"id":"pageRotateCw","title":"Rotate Clockwise","tabindex":"58","data-l10n-id":"page_rotate_cw"}},[_c('span',{attrs:{"data-l10n-id":"page_rotate_cw_label"}},[_vm._v("Rotate Clockwise")])]),_c('button',{staticClass:"secondaryToolbarButton rotateCcw",attrs:{"id":"pageRotateCcw","title":"Rotate Counterclockwise","tabindex":"59","data-l10n-id":"page_rotate_ccw"}},[_c('span',{attrs:{"data-l10n-id":"page_rotate_ccw_label"}},[_vm._v("Rotate Counterclockwise")])]),_c('div',{staticClass:"horizontalToolbarSeparator"}),_c('div',{attrs:{"id":"cursorToolButtons","role":"radiogroup"}},[_c('button',{staticClass:"secondaryToolbarButton selectTool toggled",attrs:{"id":"cursorSelectTool","title":"Enable Text Selection Tool","tabindex":"60","data-l10n-id":"cursor_text_select_tool","role":"radio","aria-checked":"true"}},[_c('span',{attrs:{"data-l10n-id":"cursor_text_select_tool_label"}},[_vm._v("Text Selection Tool")])]),_c('button',{staticClass:"secondaryToolbarButton handTool",attrs:{"id":"cursorHandTool","title":"Enable Hand Tool","tabindex":"61","data-l10n-id":"cursor_hand_tool","role":"radio","aria-checked":"false"}},[_c('span',{attrs:{"data-l10n-id":"cursor_hand_tool_label"}},[_vm._v("Hand Tool")])])]),_c('div',{attrs:{"id":"scrollModeButtons","role":"radiogroup"}},[_c('div',{staticClass:"horizontalToolbarSeparator"}),_c('button',{staticClass:"secondaryToolbarButton scrollPage",attrs:{"id":"scrollPage","title":"Use Page Scrolling","tabindex":"62","data-l10n-id":"scroll_page","role":"radio","aria-checked":"false"}},[_c('span',{attrs:{"data-l10n-id":"scroll_page_label"}},[_vm._v("Page Scrolling")])]),_c('button',{staticClass:"secondaryToolbarButton scrollVertical toggled",attrs:{"id":"scrollVertical","title":"Use Vertical Scrolling","tabindex":"63","data-l10n-id":"scroll_vertical","role":"radio","aria-checked":"true"}},[_c('span',{attrs:{"data-l10n-id":"scroll_vertical_label"}},[_vm._v("Vertical Scrolling")])]),_c('button',{staticClass:"secondaryToolbarButton scrollHorizontal",attrs:{"id":"scrollHorizontal","title":"Use Horizontal Scrolling","tabindex":"64","data-l10n-id":"scroll_horizontal","role":"radio","aria-checked":"false"}},[_c('span',{attrs:{"data-l10n-id":"scroll_horizontal_label"}},[_vm._v("Horizontal Scrolling")])]),_c('button',{staticClass:"secondaryToolbarButton scrollWrapped",attrs:{"id":"scrollWrapped","title":"Use Wrapped Scrolling","tabindex":"65","data-l10n-id":"scroll_wrapped","role":"radio","aria-checked":"false"}},[_c('span',{attrs:{"data-l10n-id":"scroll_wrapped_label"}},[_vm._v("Wrapped Scrolling")])])]),_c('div',{attrs:{"id":"spreadModeButtons","role":"radiogroup"}},[_c('div',{staticClass:"horizontalToolbarSeparator"}),_c('button',{staticClass:"secondaryToolbarButton spreadNone toggled",attrs:{"id":"spreadNone","title":"Do not join page spreads","tabindex":"66","data-l10n-id":"spread_none","role":"radio","aria-checked":"true"}},[_c('span',{attrs:{"data-l10n-id":"spread_none_label"}},[_vm._v("No Spreads")])]),_c('button',{staticClass:"secondaryToolbarButton spreadOdd",attrs:{"id":"spreadOdd","title":"Join page spreads starting with odd-numbered pages","tabindex":"67","data-l10n-id":"spread_odd","role":"radio","aria-checked":"false"}},[_c('span',{attrs:{"data-l10n-id":"spread_odd_label"}},[_vm._v("Odd Spreads")])]),_c('button',{staticClass:"secondaryToolbarButton spreadEven",attrs:{"id":"spreadEven","title":"Join page spreads starting with even-numbered pages","tabindex":"68","data-l10n-id":"spread_even","role":"radio","aria-checked":"false"}},[_c('span',{attrs:{"data-l10n-id":"spread_even_label"}},[_vm._v("Even Spreads")])])]),_c('div',{staticClass:"horizontalToolbarSeparator"}),_c('button',{staticClass:"secondaryToolbarButton documentProperties",attrs:{"id":"documentProperties","title":"文档属性…","tabindex":"69","data-l10n-id":"document_properties","aria-controls":"documentPropertiesDialog"}},[_c('span',{attrs:{"data-l10n-id":"document_properties_label"}},[_vm._v("文档属性…")])])])])
572
572
  },function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"toolbar"},[_c('div',{attrs:{"id":"toolbarContainer"}},[_c('div',{attrs:{"id":"toolbarViewer"}},[_c('div',{attrs:{"id":"toolbarViewerLeft"}},[_c('button',{staticClass:"toolbarButton",attrs:{"id":"sidebarToggle","title":"Toggle Sidebar","tabindex":"11","data-l10n-id":"toggle_sidebar","aria-expanded":"false","aria-controls":"sidebarContainer"}},[_c('span',{attrs:{"data-l10n-id":"toggle_sidebar_label"}},[_vm._v("切换侧栏")])]),_c('div',{staticClass:"splitToolbarButton hiddenSmallView"},[_c('button',{staticClass:"toolbarButton pageUp",attrs:{"title":"上一页","id":"previous","tabindex":"13","data-l10n-id":"previous"}},[_c('span',{attrs:{"data-l10n-id":"previous_label"}},[_vm._v("上一页")])]),_c('div',{staticClass:"splitToolbarButtonSeparator"}),_c('button',{staticClass:"toolbarButton pageDown",attrs:{"title":"下一页","id":"next","tabindex":"14","data-l10n-id":"next"}},[_c('span',{attrs:{"data-l10n-id":"next_label"}},[_vm._v("下一页")])])]),_c('input',{staticClass:"toolbarField pageNumber",attrs:{"type":"number","id":"pageNumber","title":"页面","value":"1","size":"4","min":"1","tabindex":"15","data-l10n-id":"page","autocomplete":"off"}}),_c('span',{staticClass:"toolbarLabel",attrs:{"id":"numPages"}})]),_c('div',{attrs:{"id":"toolbarViewerRight"}},[_c('button',{staticClass:"toolbarButton openFile hiddenLargeView",attrs:{"id":"openFile","title":"打开文件","tabindex":"32","data-l10n-id":"open_file"}},[_c('span',{attrs:{"data-l10n-id":"open_file_label"}},[_vm._v("打开")])]),_c('button',{staticClass:"toolbarButton print hiddenMediumView",attrs:{"id":"print","title":"打印","tabindex":"33","data-l10n-id":"print"}},[_c('span',{attrs:{"data-l10n-id":"print_label"}},[_vm._v("打印")])]),_c('div',{staticClass:"verticalToolbarSeparator hiddenSmallView"}),_c('button',{staticClass:"toolbarButton",attrs:{"id":"secondaryToolbarToggle","title":"工具","tabindex":"36","data-l10n-id":"tools","aria-expanded":"false","aria-controls":"secondaryToolbar"}},[_c('span',{attrs:{"data-l10n-id":"tools_label"}},[_vm._v("工具")])])]),_c('div',{attrs:{"id":"toolbarViewerMiddle"}},[_c('div',{staticClass:"splitToolbarButton"},[_c('button',{staticClass:"toolbarButton zoomOut",attrs:{"id":"zoomOut","title":"缩小","tabindex":"21","data-l10n-id":"zoom_out"}},[_c('span',{attrs:{"data-l10n-id":"zoom_out_label"}},[_vm._v("缩小")])]),_c('div',{staticClass:"splitToolbarButtonSeparator"}),_c('button',{staticClass:"toolbarButton zoomIn",attrs:{"id":"zoomIn","title":"放大","tabindex":"22","data-l10n-id":"zoom_in"}},[_c('span',{attrs:{"data-l10n-id":"zoom_in_label"}},[_vm._v("放大")])])]),_c('span',{staticClass:"dropdownToolbarButton",attrs:{"id":"scaleSelectContainer"}},[_c('select',{attrs:{"id":"scaleSelect","title":"缩放","tabindex":"23","data-l10n-id":"zoom"}},[_c('option',{attrs:{"id":"pageAutoOption","title":"","value":"auto","selected":"selected","data-l10n-id":"page_scale_auto"}},[_vm._v("自动缩放")]),_c('option',{attrs:{"id":"pageActualOption","title":"","value":"page-actual","data-l10n-id":"page_scale_actual"}},[_vm._v("实际大小")]),_c('option',{attrs:{"id":"pageFitOption","title":"","value":"page-fit","data-l10n-id":"page_scale_fit"}},[_vm._v("适合页面")]),_c('option',{attrs:{"id":"pageWidthOption","title":"","value":"page-width","data-l10n-id":"page_scale_width"}},[_vm._v("适合页宽")]),_c('option',{attrs:{"id":"customScaleOption","title":"","value":"custom","disabled":"disabled","hidden":"true"}}),_c('option',{attrs:{"title":"","value":"0.5","data-l10n-id":"page_scale_percent","data-l10n-args":"{ \"scale\": 50 }"}},[_vm._v("50%")]),_c('option',{attrs:{"title":"","value":"0.75","data-l10n-id":"page_scale_percent","data-l10n-args":"{ \"scale\": 75 }"}},[_vm._v("75%")]),_c('option',{attrs:{"title":"","value":"1","data-l10n-id":"page_scale_percent","data-l10n-args":"{ \"scale\": 100 }"}},[_vm._v("100%")]),_c('option',{attrs:{"title":"","value":"1.25","data-l10n-id":"page_scale_percent","data-l10n-args":"{ \"scale\": 125 }"}},[_vm._v("125%")]),_c('option',{attrs:{"title":"","value":"1.5","data-l10n-id":"page_scale_percent","data-l10n-args":"{ \"scale\": 150 }"}},[_vm._v("150%")]),_c('option',{attrs:{"title":"","value":"2","data-l10n-id":"page_scale_percent","data-l10n-args":"{ \"scale\": 200 }"}},[_vm._v("200%")]),_c('option',{attrs:{"title":"","value":"3","data-l10n-id":"page_scale_percent","data-l10n-args":"{ \"scale\": 300 }"}},[_vm._v("300%")]),_c('option',{attrs:{"title":"","value":"4","data-l10n-id":"page_scale_percent","data-l10n-args":"{ \"scale\": 400 }"}},[_vm._v("400%")])])])])])])])
573
573
  },function (){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{"id":"errorWrapper","hidden":"true"}},[_c('div',{attrs:{"id":"errorMessageLeft"}},[_c('span',{attrs:{"id":"errorMessage"}}),_c('button',{attrs:{"id":"errorShowMore","data-l10n-id":"error_more_info"}},[_vm._v(" More Information ")]),_c('button',{attrs:{"id":"errorShowLess","data-l10n-id":"error_less_info","hidden":"true"}},[_vm._v(" Less Information ")])]),_c('div',{attrs:{"id":"errorMessageRight"}},[_c('button',{attrs:{"id":"errorClose","data-l10n-id":"error_close"}},[_vm._v(" Close ")])]),_c('div',{staticClass:"clearBoth"}),_c('textarea',{attrs:{"id":"errorMoreInfo","hidden":"true","readonly":"readonly"}})])
574
574
  },function (){var _vm=this,_c=_vm._self._c;return _c('div',{attrs:{"id":"dialogContainer"}},[_c('dialog',{attrs:{"id":"documentPropertiesDialog"}},[_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"fileNameLabel","data-l10n-id":"document_properties_file_name"}},[_vm._v("文件名:")]),_c('p',{attrs:{"id":"fileNameField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"fileSizeLabel","data-l10n-id":"document_properties_file_size"}},[_vm._v("文件大小:")]),_c('p',{attrs:{"id":"fileSizeField","aria-labelledby":"fileSizeLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"separator"}),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"titleLabel","data-l10n-id":"document_properties_title"}},[_vm._v("标题:")]),_c('p',{attrs:{"id":"titleField","aria-labelledby":"titleLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"authorLabel","data-l10n-id":"document_properties_author"}},[_vm._v("作者:")]),_c('p',{attrs:{"id":"authorField","aria-labelledby":"authorLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"subjectLabel","data-l10n-id":"document_properties_subject"}},[_vm._v("主题:")]),_c('p',{attrs:{"id":"subjectField","aria-labelledby":"subjectLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"keywordsLabel","data-l10n-id":"document_properties_keywords"}},[_vm._v("关键词:")]),_c('p',{attrs:{"id":"keywordsField","aria-labelledby":"keywordsLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"creationDateLabel","data-l10n-id":"document_properties_creation_date"}},[_vm._v("创建日期:")]),_c('p',{attrs:{"id":"creationDateField","aria-labelledby":"creationDateLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"modificationDateLabel","data-l10n-id":"document_properties_modification_date"}},[_vm._v("修改日期:")]),_c('p',{attrs:{"id":"modificationDateField","aria-labelledby":"modificationDateLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"creatorLabel","data-l10n-id":"document_properties_creator"}},[_vm._v("创建者:")]),_c('p',{attrs:{"id":"creatorField","aria-labelledby":"creatorLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"separator"}),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"producerLabel","data-l10n-id":"document_properties_producer"}},[_vm._v("OFD 生成器:")]),_c('p',{attrs:{"id":"producerField","aria-labelledby":"producerLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"versionLabel","data-l10n-id":"document_properties_version"}},[_vm._v("OFD 版本:")]),_c('p',{attrs:{"id":"versionField","aria-labelledby":"versionLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"pageCountLabel","data-l10n-id":"document_properties_page_count"}},[_vm._v("页数:")]),_c('p',{attrs:{"id":"pageCountField","aria-labelledby":"pageCountLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"pageSizeLabel","data-l10n-id":"document_properties_page_size"}},[_vm._v("页面大小:")]),_c('p',{attrs:{"id":"pageSizeField","aria-labelledby":"pageSizeLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"separator"}),_c('div',{staticClass:"row",attrs:{"hidden":"hidden"}},[_c('span',{attrs:{"id":"linearizedLabel","data-l10n-id":"document_properties_linearized"}},[_vm._v("快速 Web 视图:")]),_c('p',{attrs:{"id":"linearizedField","aria-labelledby":"linearizedLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"buttonRow"},[_c('button',{staticClass:"dialogButton",attrs:{"id":"documentPropertiesClose"}},[_c('span',{attrs:{"data-l10n-id":"document_properties_close"}},[_vm._v("关闭")])])])]),_c('dialog',{staticStyle:{"min-width":"200px"},attrs:{"id":"printServiceDialog"}},[_c('div',{staticClass:"row"},[_c('span',{attrs:{"data-l10n-id":"print_progress_message"}},[_vm._v("正在准备打印文档…")])]),_c('div',{staticClass:"row"},[_c('progress',{attrs:{"id":"printProgress","value":"0","max":"100"}}),_c('span',{staticClass:"relative-progress",attrs:{"data-l10n-id":"print_progress_percent","data-l10n-args":"{ \"progress\": 0 }"}},[_vm._v("0%")])]),_c('div',{staticClass:"buttonRow"},[_c('button',{staticClass:"dialogButton",attrs:{"id":"printCancel"}},[_c('span',{attrs:{"data-l10n-id":"print_progress_close"}},[_vm._v("取消")])])])]),_c('dialog',{attrs:{"id":"signaturePropertiesDialog"}},[_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"signerLabel"}},[_vm._v("签章人:")]),_c('p',{attrs:{"id":"signerField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"providerLabel"}},[_vm._v("签章提供者:")]),_c('p',{attrs:{"id":"providerField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"hashedValueLabel"}},[_vm._v("原文摘要值:")]),_c('p',{attrs:{"id":"hashedValueField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"signedValueLabel"}},[_vm._v("签名值:")]),_c('p',{attrs:{"id":"signedValueField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"signMethodLabel"}},[_vm._v("签名算法:")]),_c('p',{attrs:{"id":"signMethodField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"signVersionLabel"}},[_vm._v("版本号:")]),_c('p',{attrs:{"id":"signVersionField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"verifyLabel"}},[_vm._v("验签结果:")]),_c('p',{attrs:{"id":"verifyField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"separator"}),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"sealIDLabel"}},[_vm._v("印章标识:")]),_c('p',{attrs:{"id":"sealIDField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"sealNameLabel"}},[_vm._v("印章名称:")]),_c('p',{attrs:{"id":"sealNameField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"sealTypeLabel"}},[_vm._v("印章类型:")]),_c('p',{attrs:{"id":"sealTypeField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"sealAuthTimeLabel"}},[_vm._v("有效时间:")]),_c('p',{attrs:{"id":"sealAuthTimeField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"sealMakeTimeLabel"}},[_vm._v("制章日期:")]),_c('p',{attrs:{"id":"sealMakeTimeField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"row"},[_c('span',{attrs:{"id":"sealVersionLabel"}},[_vm._v("印章版本:")]),_c('p',{attrs:{"id":"sealVersionField","aria-labelledby":"fileNameLabel"}},[_vm._v("-")])]),_c('div',{staticClass:"buttonRow"},[_c('button',{staticClass:"dialogButton",attrs:{"id":"signaturePropertiesClose"}},[_c('span',{attrs:{"data-l10n-id":"document_properties_close"}},[_vm._v("关闭")])])])])])
575
575
  }]
576
576
 
577
577
 
578
- ;// CONCATENATED MODULE: ./packages/ofdView/src/index.vue?vue&type=template&id=7f7c718c&scoped=true&
578
+ ;// CONCATENATED MODULE: ./packages/ofdView/src/index.vue?vue&type=template&id=7dfc8129&scoped=true&
579
579
 
580
- ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/draggable-resizable/draggable-resizable.vue?vue&type=template&id=eeede7ac&scoped=true&
581
- var draggable_resizablevue_type_template_id_eeede7ac_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"vdr",class:{
580
+ ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/draggable-resizable/draggable-resizable.vue?vue&type=template&id=b44a7a5c&scoped=true&
581
+ var draggable_resizablevue_type_template_id_b44a7a5c_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"vdr",class:{
582
582
  draggable: _vm.draggable,
583
583
  resizable: _vm.resizable,
584
584
  active: _vm.enabled,
@@ -586,603 +586,603 @@ var draggable_resizablevue_type_template_id_eeede7ac_scoped_true_render = functi
586
586
  resizing: _vm.resizing
587
587
  },style:(_vm.style),on:{"mousedown":_vm.elmDown,"touchstart":_vm.elmDown}},[(_vm.editable)?_c('button',{staticClass:"btn btn-danger btn-elevate btn-pill btn-icon btn-elevate-air btn-sm",staticStyle:{"position":"absolute","right":"5px","top":"-20px"},attrs:{"type":"button"},on:{"click":function($event){$event.stopPropagation();return _vm.dropItem.apply(null, arguments)}}},[_c('span',{staticClass:"close"})]):_vm._e(),_vm._l((_vm.handles),function(handle){return (_vm.resizable)?_c('div',{key:handle,staticClass:"handle",class:'handle-' + handle,style:({ display: _vm.enabled ? 'block' : 'none'}),on:{"mousedown":function($event){return _vm.handleDown(handle, $event)},"touchstart":function($event){return _vm.handleDown(handle, $event)}}}):_vm._e()}),_vm._t("default")],2)
588
588
  }
589
- var draggable_resizablevue_type_template_id_eeede7ac_scoped_true_staticRenderFns = []
589
+ var draggable_resizablevue_type_template_id_b44a7a5c_scoped_true_staticRenderFns = []
590
590
 
591
591
 
592
592
  ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/draggable-resizable/draggable-resizable.vue?vue&type=script&lang=js&
593
593
 
594
- function isFunction (func) {
595
- return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]'
596
- }
594
+ function isFunction(func) {
595
+ return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]'
596
+ }
597
597
 
598
- function matchesSelectorToParentElements (el, selector, baseNode) {
599
- let node = el;
600
- const matchesSelectorFunc = [
601
- 'matches',
602
- 'webkitMatchesSelector',
603
- 'mozMatchesSelector',
604
- 'msMatchesSelector',
605
- 'oMatchesSelector'
606
- ].find(func => isFunction(node[func]));
598
+ function matchesSelectorToParentElements(el, selector, baseNode) {
599
+ let node = el;
600
+ const matchesSelectorFunc = [
601
+ 'matches',
602
+ 'webkitMatchesSelector',
603
+ 'mozMatchesSelector',
604
+ 'msMatchesSelector',
605
+ 'oMatchesSelector'
606
+ ].find(func => isFunction(node[func]));
607
607
 
608
- if (!isFunction(node[matchesSelectorFunc])) return false;
608
+ if (!isFunction(node[matchesSelectorFunc])) return false;
609
609
 
610
- do {
611
- if (node[matchesSelectorFunc](selector)) return true;
612
- if (node === baseNode) return false;
613
- node = node.parentNode
614
- } while (node);
610
+ do {
611
+ if (node[matchesSelectorFunc](selector)) return true;
612
+ if (node === baseNode) return false;
613
+ node = node.parentNode
614
+ } while (node);
615
615
 
616
- return false
617
- }
616
+ return false
617
+ }
618
618
 
619
- /* harmony default export */ var draggable_resizablevue_type_script_lang_js_ = ({
620
- replace: true,
621
- name: 'VueDraggableResizable',
622
- props: {
623
- active: {
624
- type: Boolean, default: false
625
- },
626
- draggable: {
627
- type: Boolean, default: true
628
- },
629
- resizable: {
630
- type: Boolean, default: true
631
- },
632
- editable: {
633
- type: Boolean, default: true
634
- },
635
- originBottom: {
636
- type: Boolean, default: true
637
- },
638
- w: {
639
- type: Number,
640
- default: 200,
641
- validator: function (val) {
642
- return val > 0
643
- }
644
- },
645
- h: {
646
- type: Number,
647
- default: 200,
648
- validator: function (val) {
649
- return val > 0
650
- }
651
- },
652
- minw: {
653
- type: Number,
654
- default: 50,
655
- validator: function (val) {
656
- return val >= 0
657
- }
658
- },
659
- minh: {
660
- type: Number,
661
- default: 50,
662
- validator: function (val) {
663
- return val >= 0
664
- }
665
- },
666
- x: {
667
- type: Number,
668
- default: 0,
669
- validator: function (val) {
670
- return typeof val === 'number'
671
- }
672
- },
673
- y: {
674
- type: Number,
675
- default: 0,
676
- validator: function (val) {
677
- return typeof val === 'number'
678
- }
679
- },
680
- z: {
681
- type: [ String, Number ],
682
- default: 'auto',
683
- validator: function (val) {
684
- return (typeof val === 'string') ? val === 'auto' : val >= 0;
685
- }
686
- },
687
- handles: {
688
- type: Array,
689
- default: function () {
690
- return ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']
691
- },
692
- validator: function (val) {
693
- let s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']);
694
- return new Set(val.filter(h => s.has(h))).size === val.length
695
- }
696
- },
697
- dragHandle: {
698
- type: String,
699
- default: null
700
- },
701
- dragCancel: {
702
- type: String,
703
- default: null
704
- },
705
- axis: {
706
- type: String,
707
- default: 'both',
708
- validator: function (val) {
709
- return ['x', 'y', 'both'].indexOf(val) !== -1
710
- }
711
- },
712
- grid: {
713
- type: Array,
714
- default: function () {
715
- return [1, 1]
716
- }
717
- },
718
- parent: {
719
- type: Element, default: null
720
- },
721
- maximize: {
722
- type: Boolean, default: false
723
- },
724
- pages:{
725
- type: Array, required: false, default: null
726
- },
727
- eventBus: {
728
- type: Object, default: null
729
- },
730
- index: {
731
- type: Number, required: false, default: 0
732
- },
733
- currentPage: {
734
- type: Number, required: false, default: 0
735
- },
736
- stampId: {
737
- type: String, required: false, default: null
738
- }
619
+ /* harmony default export */ var draggable_resizablevue_type_script_lang_js_ = ({
620
+ replace: true,
621
+ name: 'VueDraggableResizable',
622
+ props: {
623
+ active: {
624
+ type: Boolean, default: false
625
+ },
626
+ draggable: {
627
+ type: Boolean, default: true
628
+ },
629
+ resizable: {
630
+ type: Boolean, default: true
739
631
  },
740
- created: function () {
741
- this.parentX = 0;
742
- this.parentW = 9999;
743
- this.parentY = 0;
744
- this.parentH = 9999;
745
- this.mouseX = 0;
746
- this.mouseY = 0;
747
- this.lastMouseX = 0;
748
- this.lastMouseY = 0;
749
- this.mouseOffX = 0;
750
- this.mouseOffY = 0;
751
- this.elmX = 0;
752
- this.elmY = 0;
753
- this.elmW = 0;
754
- this.elmH = 0;
755
- this.scrollPosition = 0;
756
- this.scrollDist = 0;
757
- this.pagesCount = this.pages ? this.pages.length : 0;
758
- this.section = [];
759
- this.scale = null;
632
+ editable: {
633
+ type: Boolean, default: true
634
+ },
635
+ originBottom: {
636
+ type: Boolean, default: true
760
637
  },
761
- mounted: function () {
762
- this.parent.addEventListener('mousemove', this.handleMove, false);
763
- this.parent.addEventListener('mousedown', this.deselect, false);
764
- this.parent.addEventListener('mouseup', this.handleUp, false);
765
- // touch events bindings
766
- this.parent.addEventListener('touchmove', this.handleMove, false);
767
- this.parent.addEventListener('touchend', this.handleUp, false);
768
- // this.parent.addEventListener('touchstart', this.handleUp, false);
769
- this.parent.addEventListener('touchstart', this.deselect, false);
770
- if(this.parent){
771
- this.parent.parentNode.addEventListener('scroll', this.handleScrollMove, false);
638
+ w: {
639
+ type: Number,
640
+ default: 200,
641
+ validator: function (val) {
642
+ return val > 0
772
643
  }
773
- //resize
774
- if(this.eventBus){
775
- this.eventBus.on('stampResize', this.stampResize);
644
+ },
645
+ h: {
646
+ type: Number,
647
+ default: 200,
648
+ validator: function (val) {
649
+ return val > 0
776
650
  }
777
- this.elmX = parseInt(this.$el.style.left);
778
- this.elmY = parseInt(this.$el.style.top);
779
- this.elmW = this.$el.offsetWidth || this.$el.clientWidth;
780
- this.elmH = this.$el.offsetHeight || this.$el.clientHeight;
781
- this._reviewDimensions();
782
- if(this.pages){
783
- if(!this.scale){
784
- this.scale = this.pages[0].viewport.scale;
785
- }
786
- this.updateSection();
787
- this.top = this.y + 10 < 0 ? 10 : this.y + 10;
788
- if(this.top < 10){
789
- this.top = 10;
790
- }
791
- let pageIndex = this.adjust(this.section, this.top, this.currentPage - 1, this.pagesCount - 1);
792
- this.elmY = this.top;
793
- let placed = this.pages[pageIndex];
794
- if(placed && this.x - placed.div.offsetLeft - 9 > 0){
795
- //nothing
796
- }else if(placed){
797
- this.left = placed.div.offsetLeft + 9;
798
- }
799
- this.elmX = this.left;
800
- this._emitPlaced(pageIndex);
651
+ },
652
+ minw: {
653
+ type: Number,
654
+ default: 50,
655
+ validator: function (val) {
656
+ return val >= 0
801
657
  }
802
658
  },
803
- beforeUnmount: function () {
804
- this.parent.removeEventListener('mousemove', this.handleMove, false);
805
- this.parent.removeEventListener('mousedown', this.deselect, false);
806
- this.parent.removeEventListener('mouseup', this.handleUp, false);
807
- if(this.parent){
808
- this.parent.parentNode.removeEventListener('scroll', this.handleScrollMove, false);
659
+ minh: {
660
+ type: Number,
661
+ default: 50,
662
+ validator: function (val) {
663
+ return val >= 0
809
664
  }
810
- if(this.eventBus){
811
- this.eventBus.off('stampResize', this.stampResize);
665
+ },
666
+ x: {
667
+ type: Number,
668
+ default: 0,
669
+ validator: function (val) {
670
+ return typeof val === 'number'
812
671
  }
813
- // touch events bindings removed
814
- this.parent.removeEventListener('touchmove', this.handleMove, false);
815
- this.parent.removeEventListener('touchend', this.handleUp, false);
816
- // this.parent.removeEventListener('touchstart', this.handleUp, false);
817
- this.parent.removeEventListener('touchstart', this.deselect, false);
818
672
  },
819
- data: function () {
820
- return {
821
- top: this.y,
822
- left: this.x,
823
- width: this.w,
824
- height: this.h,
825
- resizing: false,
826
- dragging: false,
827
- enabled: this.active,
828
- handle: null,
829
- zIndex: this.z
673
+ y: {
674
+ type: Number,
675
+ default: 0,
676
+ validator: function (val) {
677
+ return typeof val === 'number'
830
678
  }
831
679
  },
832
- methods: {
833
- adjust(arr, val, leftIndex, rightIndex){
834
- let pageIndex = this.binarySearch(arr, val, leftIndex, rightIndex);
835
- if(pageIndex < 0 || pageIndex > this.pagesCount - 1){
836
- pageIndex = 0;
837
- }
838
- pageIndex = this.adjustBoundary(pageIndex);
839
- return pageIndex;
840
- },
841
- handleScrollMove(e){
842
- if(this.dragging){
843
- this.scrollDist = e.currentTarget.scrollTop - this.scrollPosition;
844
- this.top = this.top + this.scrollDist;
845
- this.elmY = this.top;
846
- }
847
- this.scrollPosition = e.currentTarget.scrollTop;
848
- },
849
- stampAreaUpdate(sp){
850
- //update sp-1 and sp area
851
- for(let i = sp-1; i < sp+1; i++){
852
- if(i - 1 > 0 && i < this.pagesCount){
853
- this.section[i].t = this.section[i -1].t + this.pages[i - 1].viewport.height + 11;
854
- this.section[i].o = this.pages[i -1].div.offsetLeft + 9;
855
- }
856
- }
857
- },
858
- adjustBoundary(pageIndex){
859
- if(this.pages[pageIndex] && this.top + this.elmH - this.section[pageIndex].t - this.pages[pageIndex].viewport.height > 0){
860
- if(this.top + this.elmH - this.section[pageIndex].t - this.pages[pageIndex].viewport.height - this.elmH / 2 > 0) {
861
- this.top = this.section[pageIndex+1].t;
862
- pageIndex++;
863
- }else{
864
- this.top = this.section[pageIndex+1].t - this.elmH - 9 - 2;
865
- }
866
- }
867
- return pageIndex;
680
+ z: {
681
+ type: [String, Number],
682
+ default: 'auto',
683
+ validator: function (val) {
684
+ return (typeof val === 'string') ? val === 'auto' : val >= 0;
685
+ }
686
+ },
687
+ handles: {
688
+ type: Array,
689
+ default: function () {
690
+ return ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']
868
691
  },
869
- //二分查找
870
- binarySearch(arr, val, leftIndex, rightIndex){
871
- if(leftIndex > rightIndex){
872
- return leftIndex - 1;
873
- }
874
- let midIndex = Math.floor((leftIndex + rightIndex) / 2);
875
- let midVal = arr[midIndex].t;
876
- if(midVal > val){
877
- return this.binarySearch(arr, val, leftIndex, midIndex - 1);
878
- }else if(midVal < val){
879
- return this.binarySearch(arr, val, midIndex+1, rightIndex);
880
- }else{
881
- return midIndex;
692
+ validator: function (val) {
693
+ let s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']);
694
+ return new Set(val.filter(h => s.has(h))).size === val.length
695
+ }
696
+ },
697
+ dragHandle: {
698
+ type: String,
699
+ default: null
700
+ },
701
+ dragCancel: {
702
+ type: String,
703
+ default: null
704
+ },
705
+ axis: {
706
+ type: String,
707
+ default: 'both',
708
+ validator: function (val) {
709
+ return ['x', 'y', 'both'].indexOf(val) !== -1
710
+ }
711
+ },
712
+ grid: {
713
+ type: Array,
714
+ default: function () {
715
+ return [1, 1]
716
+ }
717
+ },
718
+ parent: {
719
+ type: Element, default: null
720
+ },
721
+ maximize: {
722
+ type: Boolean, default: false
723
+ },
724
+ pages: {
725
+ type: Array, required: false, default: null
726
+ },
727
+ eventBus: {
728
+ type: Object, default: null
729
+ },
730
+ index: {
731
+ type: Number, required: false, default: 0
732
+ },
733
+ currentPage: {
734
+ type: Number, required: false, default: 0
735
+ },
736
+ stampId: {
737
+ type: String, required: false, default: null
738
+ }
739
+ },
740
+ created: function () {
741
+ this.parentX = 0;
742
+ this.parentW = 9999;
743
+ this.parentY = 0;
744
+ this.parentH = 9999;
745
+ this.mouseX = 0;
746
+ this.mouseY = 0;
747
+ this.lastMouseX = 0;
748
+ this.lastMouseY = 0;
749
+ this.mouseOffX = 0;
750
+ this.mouseOffY = 0;
751
+ this.elmX = 0;
752
+ this.elmY = 0;
753
+ this.elmW = 0;
754
+ this.elmH = 0;
755
+ this.scrollPosition = 0;
756
+ this.scrollDist = 0;
757
+ this.pagesCount = this.pages ? this.pages.length : 0;
758
+ this.section = [];
759
+ this.scale = null;
760
+ },
761
+ mounted: function () {
762
+ this.parent.addEventListener('mousemove', this.handleMove, false);
763
+ this.parent.addEventListener('mousedown', this.deselect, false);
764
+ this.parent.addEventListener('mouseup', this.handleUp, false);
765
+ // touch events bindings
766
+ this.parent.addEventListener('touchmove', this.handleMove, false);
767
+ this.parent.addEventListener('touchend', this.handleUp, false);
768
+ // this.parent.addEventListener('touchstart', this.handleUp, false);
769
+ this.parent.addEventListener('touchstart', this.deselect, false);
770
+ if (this.parent) {
771
+ this.parent.parentNode.addEventListener('scroll', this.handleScrollMove, false);
772
+ }
773
+ //resize
774
+ if (this.eventBus) {
775
+ this.eventBus.on('stampResize', this.stampResize);
776
+ }
777
+ this.elmX = parseInt(this.$el.style.left);
778
+ this.elmY = parseInt(this.$el.style.top);
779
+ this.elmW = this.$el.offsetWidth || this.$el.clientWidth;
780
+ this.elmH = this.$el.offsetHeight || this.$el.clientHeight;
781
+ this._reviewDimensions();
782
+ if (this.pages) {
783
+ if (!this.scale) {
784
+ this.scale = this.pages[0].viewport.scale;
785
+ }
786
+ this.updateSection();
787
+ this.top = this.y + 10 < 0 ? 10 : this.y + 10;
788
+ if (this.top < 10) {
789
+ this.top = 10;
790
+ }
791
+ let pageIndex = this.adjust(this.section, this.top, this.currentPage - 1, this.pagesCount - 1);
792
+ this.elmY = this.top;
793
+ let placed = this.pages[pageIndex];
794
+ if (placed && this.x - placed.div.offsetLeft - 9 > 0) {
795
+ //nothing
796
+ } else if (placed) {
797
+ this.left = placed.div.offsetLeft + 9;
798
+ }
799
+ this.elmX = this.left;
800
+ this._emitPlaced(pageIndex);
801
+ }
802
+ },
803
+ beforeUnmount: function () {
804
+ this.parent.removeEventListener('mousemove', this.handleMove, false);
805
+ this.parent.removeEventListener('mousedown', this.deselect, false);
806
+ this.parent.removeEventListener('mouseup', this.handleUp, false);
807
+ if (this.parent) {
808
+ this.parent.parentNode.removeEventListener('scroll', this.handleScrollMove, false);
809
+ }
810
+ if (this.eventBus) {
811
+ this.eventBus.off('stampResize', this.stampResize);
812
+ }
813
+ // touch events bindings removed
814
+ this.parent.removeEventListener('touchmove', this.handleMove, false);
815
+ this.parent.removeEventListener('touchend', this.handleUp, false);
816
+ // this.parent.removeEventListener('touchstart', this.handleUp, false);
817
+ this.parent.removeEventListener('touchstart', this.deselect, false);
818
+ },
819
+ data: function () {
820
+ return {
821
+ top: this.y,
822
+ left: this.x,
823
+ width: this.w,
824
+ height: this.h,
825
+ resizing: false,
826
+ dragging: false,
827
+ enabled: this.active,
828
+ handle: null,
829
+ zIndex: this.z
830
+ }
831
+ },
832
+ methods: {
833
+ adjust(arr, val, leftIndex, rightIndex) {
834
+ let pageIndex = this.binarySearch(arr, val, leftIndex, rightIndex);
835
+ if (pageIndex < 0 || pageIndex > this.pagesCount - 1) {
836
+ pageIndex = 0;
837
+ }
838
+ pageIndex = this.adjustBoundary(pageIndex);
839
+ return pageIndex;
840
+ },
841
+ handleScrollMove(e) {
842
+ if (this.dragging) {
843
+ this.scrollDist = e.currentTarget.scrollTop - this.scrollPosition;
844
+ this.top = this.top + this.scrollDist;
845
+ this.elmY = this.top;
846
+ }
847
+ this.scrollPosition = e.currentTarget.scrollTop;
848
+ },
849
+ stampAreaUpdate(sp) {
850
+ //update sp-1 and sp area
851
+ for (let i = sp - 1; i < sp + 1; i++) {
852
+ if (i - 1 > 0 && i < this.pagesCount) {
853
+ this.section[i].t = this.section[i - 1].t + this.pages[i - 1].viewport.height + 11;
854
+ this.section[i].o = this.pages[i - 1].div.offsetLeft + 9;
882
855
  }
883
- },
884
- updateSection(){
885
- this.section.length = 0;
886
- let t = 10;
887
- for(let i = 0; i < this.pagesCount; i++){
888
- t = t + (i > 0 ? this.pages[this.originBottom?i:i-1].viewport.height : 0) + (i > 0 ? 9+2 : 0);
889
- this.section.push({
890
- t,
891
- o: this.pages[i].div.offsetLeft + 9
892
- });
856
+ }
857
+ },
858
+ adjustBoundary(pageIndex) {
859
+ if (this.pages[pageIndex] && this.top + this.elmH - this.section[pageIndex].t - this.pages[pageIndex].viewport.height > 0) {
860
+ if (this.top + this.elmH - this.section[pageIndex].t - this.pages[pageIndex].viewport.height - this.elmH / 2 > 0) {
861
+ this.top = this.section[pageIndex + 1].t;
862
+ pageIndex++;
863
+ } else {
864
+ this.top = this.section[pageIndex + 1].t - this.elmH - 9 - 2;
893
865
  }
866
+ }
867
+ return pageIndex;
868
+ },
869
+ //二分查找
870
+ binarySearch(arr, val, leftIndex, rightIndex) {
871
+ if (leftIndex > rightIndex) {
872
+ return leftIndex - 1;
873
+ }
874
+ let midIndex = Math.floor((leftIndex + rightIndex) / 2);
875
+ let midVal = arr[midIndex].t;
876
+ if (midVal > val) {
877
+ return this.binarySearch(arr, val, leftIndex, midIndex - 1);
878
+ } else if (midVal < val) {
879
+ return this.binarySearch(arr, val, midIndex + 1, rightIndex);
880
+ } else {
881
+ return midIndex;
882
+ }
883
+ },
884
+ updateSection() {
885
+ this.section.length = 0;
886
+ let t = 10;
887
+ for (let i = 0; i < this.pagesCount; i++) {
888
+ t = t + (i > 0 ? this.pages[this.originBottom ? i : i - 1].viewport.height : 0) + (i > 0 ? 9 + 2 : 0);
894
889
  this.section.push({
895
- t: this.section[this.pagesCount-1].t + this.pages[this.pagesCount-1].viewport.height +9+2,
896
- o: this.pages[this.pagesCount-1].div.offsetLeft + 9
890
+ t,
891
+ o: this.pages[i].div.offsetLeft + 9
897
892
  });
898
- },
899
- stampResize(){
900
- if(this.scale != null){
901
- const section = [].concat(this.section);
902
- this.updateSection();
903
- const TOP = this.top;
904
- let pageIndex = this.binarySearch(section, TOP, this.currentPage - 1, this.pagesCount - 1);
905
- if(pageIndex < 0){
906
- pageIndex = 0;
907
- }
908
- const currentScale = this.pages[0].viewport.scale;
909
- const WIDTH = this.width;
910
- const HEIGHT = this.height;
911
- this.width = (WIDTH * currentScale) / this.scale;
912
- this.height = (HEIGHT * currentScale) / this.scale;
913
- const LEFT = this.left;
914
- this.top = ((TOP - 10) * currentScale) / this.scale + 10;
915
- this.left = this.pages[pageIndex].div.offsetLeft + (((LEFT - section[pageIndex].o) * currentScale) / this.scale) + 9;
916
- this.elmW = this.width;
917
- this.elmH = this.height;
918
- this.elmX = this.left;
919
- this.elmY = this.top;
920
- this.scale = currentScale;
921
- this._emitPlaced(pageIndex);
922
- }
923
- },
924
-
925
- _emitPlaced(pageIndex){
926
- this.$emit('placed', pageIndex, this.index, {
927
- x : (this.left - this.section[pageIndex].o) / this.pages[pageIndex].viewport.width,
928
- y: (!this.originBottom ? (this.top - this.section[pageIndex].t) : (this.pages[pageIndex].viewport.height - (this.top + this.elmH - this.section[pageIndex].t))) / this.pages[pageIndex].viewport.height,
929
- w: this.elmW / this.pages[pageIndex].viewport.width,
930
- h: this.elmH / this.pages[pageIndex].viewport.height
931
- }, this.stampId);
932
- },
933
- _reviewDimensions(){
934
- if (this.minw > this.w) this.width = this.minw;
935
- if (this.minh > this.h) this.height = this.minh;
936
- if (this.parent) {
937
- const parentW = parseInt(this.parent.scrollWidth, 10);
938
- const parentH = parseInt(this.parent.scrollHeight, 10);
939
- this.parentW = parentW;
940
- this.parentH = parentH;
941
- if (this.w > this.parentW) this.width = parentW;
942
- if (this.h > this.parentH) this.height = parentH;
943
- if ((this.x + this.w) > this.parentW) this.width = parentW - this.x;
944
- if ((this.y + this.h) > this.parentH) this.height = parentH - this.y;
893
+ }
894
+ this.section.push({
895
+ t: this.section[this.pagesCount - 1].t + this.pages[this.pagesCount - 1].viewport.height + 9 + 2,
896
+ o: this.pages[this.pagesCount - 1].div.offsetLeft + 9
897
+ });
898
+ },
899
+ stampResize() {
900
+ if (this.scale != null) {
901
+ const section = [].concat(this.section);
902
+ this.updateSection();
903
+ const TOP = this.top;
904
+ let pageIndex = this.binarySearch(section, TOP, this.currentPage - 1, this.pagesCount - 1);
905
+ if (pageIndex < 0) {
906
+ pageIndex = 0;
945
907
  }
908
+ const currentScale = this.pages[0].viewport.scale;
909
+ const WIDTH = this.width;
910
+ const HEIGHT = this.height;
911
+ this.width = (WIDTH * currentScale) / this.scale;
912
+ this.height = (HEIGHT * currentScale) / this.scale;
913
+ const LEFT = this.left;
914
+ this.top = ((TOP - 10) * currentScale) / this.scale + 10;
915
+ this.left = this.pages[pageIndex].div.offsetLeft + (((LEFT - section[pageIndex].o) * currentScale) / this.scale) + 9;
946
916
  this.elmW = this.width;
947
917
  this.elmH = this.height;
948
- },
949
- reviewDimensions: function () {
950
- this._reviewDimensions();
951
- this.$emit('resizing', this.left, this.top, this.width, this.height)
952
- },
953
- elmDown: function (e) {
954
- const target = e.target || e.srcElement;
955
- if (this.$el.contains(target)) {
956
- if (
918
+ this.elmX = this.left;
919
+ this.elmY = this.top;
920
+ this.scale = currentScale;
921
+ this._emitPlaced(pageIndex);
922
+ }
923
+ },
924
+
925
+ _emitPlaced(pageIndex) {
926
+ this.$emit('placed', pageIndex, this.index, {
927
+ x: (this.left - this.section[pageIndex].o) / this.pages[pageIndex].viewport.width,
928
+ y: (!this.originBottom ? (this.top - this.section[pageIndex].t) : (this.pages[pageIndex].viewport.height - (this.top + this.elmH - this.section[pageIndex].t))) / this.pages[pageIndex].viewport.height,
929
+ w: this.elmW / this.pages[pageIndex].viewport.width,
930
+ h: this.elmH / this.pages[pageIndex].viewport.height
931
+ }, this.stampId);
932
+ },
933
+ _reviewDimensions() {
934
+ if (this.minw > this.w) this.width = this.minw;
935
+ if (this.minh > this.h) this.height = this.minh;
936
+ if (this.parent) {
937
+ const parentW = parseInt(this.parent.scrollWidth, 10);
938
+ const parentH = parseInt(this.parent.scrollHeight, 10);
939
+ this.parentW = parentW;
940
+ this.parentH = parentH;
941
+ if (this.w > this.parentW) this.width = parentW;
942
+ if (this.h > this.parentH) this.height = parentH;
943
+ if ((this.x + this.w) > this.parentW) this.width = parentW - this.x;
944
+ if ((this.y + this.h) > this.parentH) this.height = parentH - this.y;
945
+ }
946
+ this.elmW = this.width;
947
+ this.elmH = this.height;
948
+ },
949
+ reviewDimensions: function () {
950
+ this._reviewDimensions();
951
+ this.$emit('resizing', this.left, this.top, this.width, this.height)
952
+ },
953
+ elmDown: function (e) {
954
+ const target = e.target || e.srcElement;
955
+ if (this.$el.contains(target)) {
956
+ if (
957
957
  (this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) ||
958
958
  (this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el))) {
959
- return
960
- }
961
- this.reviewDimensions();
962
- if (!this.enabled) {
963
- this.enabled = true
964
- this.$emit('activated')
965
- this.$emit('update:active', true)
966
- }
967
- if (this.draggable) {
968
- this.dragging = true
969
- }
959
+ return
970
960
  }
971
- },
972
- deselect: function (e) {
973
- if (e.type.indexOf('touch') !== -1) {
974
- this.mouseX = e.changedTouches[0].clientX
975
- this.mouseY = e.changedTouches[0].clientY
976
- } else {
977
- this.mouseX = e.pageX || e.clientX + this.parent.scrollLeft
978
- this.mouseY = e.pageY || e.clientY + this.parent.scrollTop
961
+ this.reviewDimensions();
962
+ if (!this.enabled) {
963
+ this.enabled = true
964
+ this.$emit('activated')
965
+ this.$emit('update:active', true)
979
966
  }
980
- this.lastMouseX = this.mouseX
981
- this.lastMouseY = this.mouseY
982
- const target = e.target || e.srcElement
983
- const regex = new RegExp('handle-([trmbl]{2})', '')
984
- if (!this.$el.contains(target) && !regex.test(target.className)) {
985
- if (this.enabled) {
986
- this.enabled = false
987
- this.$emit('deactivated')
988
- this.$emit('update:active', false)
989
- }
967
+ if (this.draggable) {
968
+ this.dragging = true
990
969
  }
991
- },
992
- handleDown: function (handle, e) {
993
- this.handle = handle;
994
- if (e.cancelable) {
995
- e.stopPropagation();
996
- e.preventDefault();
970
+ }
971
+ },
972
+ deselect: function (e) {
973
+ if (e.type.indexOf('touch') !== -1) {
974
+ this.mouseX = e.changedTouches[0].clientX
975
+ this.mouseY = e.changedTouches[0].clientY
976
+ } else {
977
+ this.mouseX = e.pageX || e.clientX + this.parent.scrollLeft
978
+ this.mouseY = e.pageY || e.clientY + this.parent.scrollTop
979
+ }
980
+ this.lastMouseX = this.mouseX
981
+ this.lastMouseY = this.mouseY
982
+ const target = e.target || e.srcElement
983
+ const regex = new RegExp('handle-([trmbl]{2})', '')
984
+ if (!this.$el.contains(target) && !regex.test(target.className)) {
985
+ if (this.enabled) {
986
+ this.enabled = false
987
+ this.$emit('deactivated')
988
+ this.$emit('update:active', false)
997
989
  }
998
- this.resizing = true;
999
- },
1000
- // fillParent: function (e) {
1001
- // if (!this.parent || !this.resizable || !this.maximize) return
1002
- // let done = false
1003
- // const animate = () => {
1004
- // if (!done) {
1005
- // window.requestAnimationFrame(animate)
1006
- // }
1007
- // if (this.axis === 'x') {
1008
- // if (
1009
- // this.width === this.parentW && this.left === this.parentX
1010
- // ) done = true
1011
- // } else if (this.axis === 'y') {
1012
- // if (
1013
- // this.height === this.parentH && this.top === this.parentY
1014
- // ) done = true
1015
- // } else if (this.axis === 'both') {
1016
- // if (
1017
- // this.width === this.parentW &&
1018
- // this.height === this.parentH &&
1019
- // this.top === this.parentY &&
1020
- // this.left === this.parentX
1021
- // ) done = true
1022
- // }
1023
- // if (this.axis === 'x' || this.axis === 'both') {
1024
- // if (this.width < this.parentW) {
1025
- // this.width++
1026
- // this.elmW++
1027
- // }
1028
- // if (this.left > this.parentX) {
1029
- // this.left--
1030
- // this.elmX--
1031
- // }
1032
- // }
1033
- // if (this.axis === 'y' || this.axis === 'both') {
1034
- // if (this.height < this.parentH) {
1035
- // this.height++
1036
- // this.elmH++
1037
- // }
1038
- // if (this.top > this.parentY) {
1039
- // this.top--
1040
- // this.elmY--
1041
- // }
1042
- // }
1043
- // this.$emit('resizing', this.left, this.top, this.width, this.height)
1044
- // }
1045
- // window.requestAnimationFrame(animate)
1046
- // },
1047
- handleMove: function (e) {
1048
- const isTouchMove = e.type.indexOf('touchmove') !== -1
1049
- this.mouseX = isTouchMove
990
+ }
991
+ },
992
+ handleDown: function (handle, e) {
993
+ this.handle = handle;
994
+ if (e.cancelable) {
995
+ e.stopPropagation();
996
+ e.preventDefault();
997
+ }
998
+ this.resizing = true;
999
+ },
1000
+ // fillParent: function (e) {
1001
+ // if (!this.parent || !this.resizable || !this.maximize) return
1002
+ // let done = false
1003
+ // const animate = () => {
1004
+ // if (!done) {
1005
+ // window.requestAnimationFrame(animate)
1006
+ // }
1007
+ // if (this.axis === 'x') {
1008
+ // if (
1009
+ // this.width === this.parentW && this.left === this.parentX
1010
+ // ) done = true
1011
+ // } else if (this.axis === 'y') {
1012
+ // if (
1013
+ // this.height === this.parentH && this.top === this.parentY
1014
+ // ) done = true
1015
+ // } else if (this.axis === 'both') {
1016
+ // if (
1017
+ // this.width === this.parentW &&
1018
+ // this.height === this.parentH &&
1019
+ // this.top === this.parentY &&
1020
+ // this.left === this.parentX
1021
+ // ) done = true
1022
+ // }
1023
+ // if (this.axis === 'x' || this.axis === 'both') {
1024
+ // if (this.width < this.parentW) {
1025
+ // this.width++
1026
+ // this.elmW++
1027
+ // }
1028
+ // if (this.left > this.parentX) {
1029
+ // this.left--
1030
+ // this.elmX--
1031
+ // }
1032
+ // }
1033
+ // if (this.axis === 'y' || this.axis === 'both') {
1034
+ // if (this.height < this.parentH) {
1035
+ // this.height++
1036
+ // this.elmH++
1037
+ // }
1038
+ // if (this.top > this.parentY) {
1039
+ // this.top--
1040
+ // this.elmY--
1041
+ // }
1042
+ // }
1043
+ // this.$emit('resizing', this.left, this.top, this.width, this.height)
1044
+ // }
1045
+ // window.requestAnimationFrame(animate)
1046
+ // },
1047
+ handleMove: function (e) {
1048
+ const isTouchMove = e.type.indexOf('touchmove') !== -1
1049
+ this.mouseX = isTouchMove
1050
1050
  ? e.touches[0].clientX
1051
1051
  : e.pageX || e.clientX + document.documentElement.scrollLeft;
1052
- this.mouseY = isTouchMove
1052
+ this.mouseY = isTouchMove
1053
1053
  ? e.touches[0].clientY
1054
1054
  : e.pageY || e.clientY + document.documentElement.scrollTop;
1055
- let diffX = this.mouseX - this.lastMouseX + this.mouseOffX;
1056
- let diffY = this.mouseY - this.lastMouseY + this.mouseOffY;
1057
- this.mouseOffX = this.mouseOffY = 0;
1058
- this.lastMouseX = this.mouseX;
1059
- this.lastMouseY = this.mouseY;
1060
- let dX = diffX;
1061
- let dY = diffY;
1062
- if (this.resizing) {
1063
- if (this.handle.indexOf('t') >= 0) {
1064
- if (this.elmH - dY < this.minh) this.mouseOffY = (dY - (diffY = this.elmH - this.minh));
1065
- else if (this.parent && this.elmY + dY < this.parentY) this.mouseOffY = (dY - (diffY = this.parentY - this.elmY));
1066
- this.elmY += diffY
1067
- this.elmH -= diffY
1068
- }
1069
- if (this.handle.indexOf('b') >= 0) {
1070
- if (this.elmH + dY < this.minh) this.mouseOffY = (dY - (diffY = this.minh - this.elmH));
1071
- else if (this.parent && this.elmY + this.elmH + dY > this.parentH) this.mouseOffY = (dY - (diffY = this.parentH - this.elmY - this.elmH));
1072
- this.elmH += diffY
1073
- }
1074
- if (this.handle.indexOf('l') >= 0) {
1075
- if (this.elmW - dX < this.minw) this.mouseOffX = (dX - (diffX = this.elmW - this.minw));
1076
- else if (this.parent && this.elmX + dX < this.parentX) this.mouseOffX = (dX - (diffX = this.parentX - this.elmX));
1077
- this.elmX += diffX
1078
- this.elmW -= diffX
1079
- }
1080
- if (this.handle.indexOf('r') >= 0) {
1081
- if (this.elmW + dX < this.minw) this.mouseOffX = (dX - (diffX = this.minw - this.elmW))
1082
- else if (this.parent && this.elmX + this.elmW + dX > this.parentW) this.mouseOffX = (dX - (diffX = this.parentW - this.elmX - this.elmW));
1083
- this.elmW += diffX
1084
- }
1085
- this.left = (Math.round(this.elmX / this.grid[0]) * this.grid[0]);
1086
- this.top = (Math.round(this.elmY / this.grid[1]) * this.grid[1]);
1087
- this.width = (Math.round(this.elmW / this.grid[0]) * this.grid[0]);
1088
- this.height = (Math.round(this.elmH / this.grid[1]) * this.grid[1]);
1089
- this.$emit('resizing', this.left, this.top, this.width, this.height);
1090
- } else if (this.dragging) {
1091
- if (this.parent) {
1092
- this._reviewDimensions();
1093
- let [_x, _y] = [0, 10];
1094
- if(this.pages){
1095
- let pageIndex = this.binarySearch(this.section, this.elmY+ diffY, this.currentPage - 1, this.pagesCount - 1);
1096
- if(pageIndex < 0){
1097
- pageIndex = 0;
1098
- }
1099
- if(this.elmY+ diffY + this.elmH - this.section[pageIndex].t - this.pages[pageIndex].viewport.height > 0){
1100
- if(this.elmY+ diffY + this.elmH - this.section[pageIndex].t - this.pages[pageIndex].viewport.height - (this.elmH * 0.9) - 11 > 0){
1101
- pageIndex++;
1102
- }
1103
- }
1104
- _x = this.pages[pageIndex].div.offsetLeft + 9;
1105
- }
1106
- if (this.elmX + dX < this.parentX + _x){
1107
- this.mouseOffX = (dX - (diffX = this.parentX + _x - this.elmX))
1108
- } else if (this.elmX + this.elmW + dX > (this.parentW - _x)){
1109
- this.mouseOffX = (dX - (diffX = (this.parentW - _x) - this.elmX - this.elmW))
1055
+ let diffX = this.mouseX - this.lastMouseX + this.mouseOffX;
1056
+ let diffY = this.mouseY - this.lastMouseY + this.mouseOffY;
1057
+ this.mouseOffX = this.mouseOffY = 0;
1058
+ this.lastMouseX = this.mouseX;
1059
+ this.lastMouseY = this.mouseY;
1060
+ let dX = diffX;
1061
+ let dY = diffY;
1062
+ if (this.resizing) {
1063
+ if (this.handle.indexOf('t') >= 0) {
1064
+ if (this.elmH - dY < this.minh) this.mouseOffY = (dY - (diffY = this.elmH - this.minh));
1065
+ else if (this.parent && this.elmY + dY < this.parentY) this.mouseOffY = (dY - (diffY = this.parentY - this.elmY));
1066
+ this.elmY += diffY
1067
+ this.elmH -= diffY
1068
+ }
1069
+ if (this.handle.indexOf('b') >= 0) {
1070
+ if (this.elmH + dY < this.minh) this.mouseOffY = (dY - (diffY = this.minh - this.elmH));
1071
+ else if (this.parent && this.elmY + this.elmH + dY > this.parentH) this.mouseOffY = (dY - (diffY = this.parentH - this.elmY - this.elmH));
1072
+ this.elmH += diffY
1073
+ }
1074
+ if (this.handle.indexOf('l') >= 0) {
1075
+ if (this.elmW - dX < this.minw) this.mouseOffX = (dX - (diffX = this.elmW - this.minw));
1076
+ else if (this.parent && this.elmX + dX < this.parentX) this.mouseOffX = (dX - (diffX = this.parentX - this.elmX));
1077
+ this.elmX += diffX
1078
+ this.elmW -= diffX
1079
+ }
1080
+ if (this.handle.indexOf('r') >= 0) {
1081
+ if (this.elmW + dX < this.minw) this.mouseOffX = (dX - (diffX = this.minw - this.elmW))
1082
+ else if (this.parent && this.elmX + this.elmW + dX > this.parentW) this.mouseOffX = (dX - (diffX = this.parentW - this.elmX - this.elmW));
1083
+ this.elmW += diffX
1084
+ }
1085
+ this.left = (Math.round(this.elmX / this.grid[0]) * this.grid[0]);
1086
+ this.top = (Math.round(this.elmY / this.grid[1]) * this.grid[1]);
1087
+ this.width = (Math.round(this.elmW / this.grid[0]) * this.grid[0]);
1088
+ this.height = (Math.round(this.elmH / this.grid[1]) * this.grid[1]);
1089
+ this.$emit('resizing', this.left, this.top, this.width, this.height);
1090
+ } else if (this.dragging) {
1091
+ if (this.parent) {
1092
+ this._reviewDimensions();
1093
+ let [_x, _y] = [0, 10];
1094
+ if (this.pages) {
1095
+ let pageIndex = this.binarySearch(this.section, this.elmY + diffY, this.currentPage - 1, this.pagesCount - 1);
1096
+ if (pageIndex < 0) {
1097
+ pageIndex = 0;
1110
1098
  }
1111
- if (this.elmY + dY < this.parentY + _y){
1112
- this.mouseOffY = (dY - (diffY = this.parentY + _y - this.elmY))
1113
- } else if (this.elmY + this.elmH + dY > this.parentH) {
1114
- this.mouseOffY = (dY - (diffY = this.parentH - this.elmY - this.elmH))
1099
+ if (this.elmY + diffY + this.elmH - this.section[pageIndex].t - this.pages[pageIndex].viewport.height > 0) {
1100
+ if (this.elmY + diffY + this.elmH - this.section[pageIndex].t - this.pages[pageIndex].viewport.height - (this.elmH * 0.9) - 11 > 0) {
1101
+ pageIndex++;
1102
+ }
1115
1103
  }
1104
+ _x = this.pages[pageIndex].div.offsetLeft + 9;
1116
1105
  }
1117
- this.elmX += diffX;
1118
- this.elmY += diffY;
1119
- if (this.axis === 'x' || this.axis === 'both') {
1120
- this.left = (Math.round(this.elmX / this.grid[0]) * this.grid[0])
1106
+ if (this.elmX + dX < this.parentX + _x) {
1107
+ this.mouseOffX = (dX - (diffX = this.parentX + _x - this.elmX))
1108
+ } else if (this.elmX + this.elmW + dX > (this.parentW - _x)) {
1109
+ this.mouseOffX = (dX - (diffX = (this.parentW - _x) - this.elmX - this.elmW))
1121
1110
  }
1122
- if (this.axis === 'y' || this.axis === 'both') {
1123
- this.top = (Math.round(this.elmY / this.grid[1]) * this.grid[1])
1111
+ if (this.elmY + dY < this.parentY + _y) {
1112
+ this.mouseOffY = (dY - (diffY = this.parentY + _y - this.elmY))
1113
+ } else if (this.elmY + this.elmH + dY > this.parentH) {
1114
+ this.mouseOffY = (dY - (diffY = this.parentH - this.elmY - this.elmH))
1124
1115
  }
1125
- this.$emit('dragging', this.left, this.top)
1126
1116
  }
1127
- },
1128
- handleUp: function (e) {
1129
- if (e.type.indexOf('touch') !== -1) {
1130
- this.lastMouseX = e.changedTouches[0].clientX;
1131
- this.lastMouseY = e.changedTouches[0].clientY;
1117
+ this.elmX += diffX;
1118
+ this.elmY += diffY;
1119
+ if (this.axis === 'x' || this.axis === 'both') {
1120
+ this.left = (Math.round(this.elmX / this.grid[0]) * this.grid[0])
1132
1121
  }
1133
- this.handle = null;
1134
- //this.enabled = false;
1135
- if (this.resizing) {
1136
- this.resizing = false;
1137
- this.$emit('resizestop', this.left, this.top, this.width, this.height)
1122
+ if (this.axis === 'y' || this.axis === 'both') {
1123
+ this.top = (Math.round(this.elmY / this.grid[1]) * this.grid[1])
1138
1124
  }
1139
- if (this.dragging) {
1140
- this.dragging = false;
1141
- let pageIndex = 0;
1142
- if(this.pages){
1143
- pageIndex = this.adjust(this.section, this.top, this.currentPage - 1, this.pagesCount - 1);
1144
- }
1145
- this._emitPlaced(pageIndex);
1146
- this.$emit('dragstop', this.left, this.top);
1147
- }
1148
- this.elmX = this.left;
1149
- this.elmY = this.top;
1150
- },
1151
- dropItem(){
1152
- this.$emit('dropitem', this.index);
1125
+ this.$emit('dragging', this.left, this.top)
1153
1126
  }
1154
1127
  },
1155
- computed: {
1156
- style: function () {
1157
- return {
1158
- top: this.top + 'px',
1159
- left: this.left + 'px',
1160
- width: this.width + 'px',
1161
- height: this.height + 'px',
1162
- zIndex: this.zIndex
1128
+ handleUp: function (e) {
1129
+ if (e.type.indexOf('touch') !== -1) {
1130
+ this.lastMouseX = e.changedTouches[0].clientX;
1131
+ this.lastMouseY = e.changedTouches[0].clientY;
1132
+ }
1133
+ this.handle = null;
1134
+ //this.enabled = false;
1135
+ if (this.resizing) {
1136
+ this.resizing = false;
1137
+ this.$emit('resizestop', this.left, this.top, this.width, this.height)
1138
+ }
1139
+ if (this.dragging) {
1140
+ this.dragging = false;
1141
+ let pageIndex = 0;
1142
+ if (this.pages) {
1143
+ pageIndex = this.adjust(this.section, this.top, this.currentPage - 1, this.pagesCount - 1);
1163
1144
  }
1145
+ this._emitPlaced(pageIndex);
1146
+ this.$emit('dragstop', this.left, this.top);
1164
1147
  }
1148
+ this.elmX = this.left;
1149
+ this.elmY = this.top;
1165
1150
  },
1166
- watch: {
1167
- active: function (val) {
1168
- this.enabled = val
1169
- },
1170
- z: function (val) {
1171
- if (val >= 0 || val === 'auto') {
1172
- this.zIndex = val
1173
- }
1174
- },
1175
- currentPage: function(newVal){
1176
- this.stampAreaUpdate(newVal);
1177
- },
1151
+ dropItem() {
1152
+ this.$emit('dropitem', this.index);
1153
+ }
1154
+ },
1155
+ computed: {
1156
+ style: function () {
1157
+ return {
1158
+ top: this.top + 'px',
1159
+ left: this.left + 'px',
1160
+ width: this.width + 'px',
1161
+ height: this.height + 'px',
1162
+ zIndex: this.zIndex
1163
+ }
1178
1164
  }
1179
- });
1165
+ },
1166
+ watch: {
1167
+ active: function (val) {
1168
+ this.enabled = val
1169
+ },
1170
+ z: function (val) {
1171
+ if (val >= 0 || val === 'auto') {
1172
+ this.zIndex = val
1173
+ }
1174
+ },
1175
+ currentPage: function (newVal) {
1176
+ this.stampAreaUpdate(newVal);
1177
+ },
1178
+ }
1179
+ });
1180
1180
 
1181
1181
  ;// CONCATENATED MODULE: ./packages/draggable-resizable/draggable-resizable.vue?vue&type=script&lang=js&
1182
1182
  /* harmony default export */ var draggable_resizable_draggable_resizablevue_type_script_lang_js_ = (draggable_resizablevue_type_script_lang_js_);
1183
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/draggable-resizable/draggable-resizable.vue?vue&type=style&index=0&id=eeede7ac&prod&scoped=true&lang=css&
1184
- var draggable_resizablevue_type_style_index_0_id_eeede7ac_prod_scoped_true_lang_css_ = __webpack_require__(56);
1185
- ;// CONCATENATED MODULE: ./packages/draggable-resizable/draggable-resizable.vue?vue&type=style&index=0&id=eeede7ac&prod&scoped=true&lang=css&
1183
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/draggable-resizable/draggable-resizable.vue?vue&type=style&index=0&id=b44a7a5c&prod&scoped=true&lang=css&
1184
+ var draggable_resizablevue_type_style_index_0_id_b44a7a5c_prod_scoped_true_lang_css_ = __webpack_require__(141);
1185
+ ;// CONCATENATED MODULE: ./packages/draggable-resizable/draggable-resizable.vue?vue&type=style&index=0&id=b44a7a5c&prod&scoped=true&lang=css&
1186
1186
 
1187
1187
  ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
1188
1188
  /* globals __VUE_SSR_CONTEXT__ */
@@ -1293,11 +1293,11 @@ function normalizeComponent(
1293
1293
 
1294
1294
  var component = normalizeComponent(
1295
1295
  draggable_resizable_draggable_resizablevue_type_script_lang_js_,
1296
- draggable_resizablevue_type_template_id_eeede7ac_scoped_true_render,
1297
- draggable_resizablevue_type_template_id_eeede7ac_scoped_true_staticRenderFns,
1296
+ draggable_resizablevue_type_template_id_b44a7a5c_scoped_true_render,
1297
+ draggable_resizablevue_type_template_id_b44a7a5c_scoped_true_staticRenderFns,
1298
1298
  false,
1299
1299
  null,
1300
- "eeede7ac",
1300
+ "b44a7a5c",
1301
1301
  null
1302
1302
 
1303
1303
  )
@@ -1360,13 +1360,12 @@ var component = normalizeComponent(
1360
1360
  }
1361
1361
  }
1362
1362
  },
1363
-
1364
1363
  stamps: {
1365
1364
  immediate: true,
1366
1365
  handler(val) {
1367
- if (this.config && this.mem && val.length > 0) {
1368
- this.config.toolbar.openFile.hidden = true
1369
- this.config.secondaryToolbar.openFileButton.hidden = true
1366
+ if (val.length > 0 && this.config) {
1367
+ document.getElementById('scrollModeButtons').hidden = true
1368
+ document.getElementById('spreadModeButtons').hidden = true
1370
1369
  }
1371
1370
  }
1372
1371
  }
@@ -1473,6 +1472,21 @@ var component = normalizeComponent(
1473
1472
  ),
1474
1473
  openFileButton: document.getElementById('secondaryOpenFile'),
1475
1474
  printButton: document.getElementById('secondaryPrint'),
1475
+ downloadButton: document.getElementById("secondaryDownload"),
1476
+ viewBookmarkButton: document.getElementById("secondaryViewBookmark"),
1477
+ firstPageButton: document.getElementById("firstPage"),
1478
+ lastPageButton: document.getElementById("lastPage"),
1479
+ pageRotateCwButton: document.getElementById("pageRotateCw"),
1480
+ pageRotateCcwButton: document.getElementById("pageRotateCcw"),
1481
+ cursorSelectToolButton: document.getElementById("cursorSelectTool"),
1482
+ cursorHandToolButton: document.getElementById("cursorHandTool"),
1483
+ scrollPageButton: document.getElementById("scrollPage"),
1484
+ scrollVerticalButton: document.getElementById("scrollVertical"),
1485
+ scrollHorizontalButton: document.getElementById("scrollHorizontal"),
1486
+ scrollWrappedButton: document.getElementById("scrollWrapped"),
1487
+ spreadNoneButton: document.getElementById("spreadNone"),
1488
+ spreadOddButton: document.getElementById("spreadOdd"),
1489
+ spreadEvenButton: document.getElementById("spreadEven"),
1476
1490
  documentPropertiesButton: document.getElementById('documentProperties'),
1477
1491
  },
1478
1492
  sidebar: {
@@ -1483,20 +1497,20 @@ var component = normalizeComponent(
1483
1497
  // Buttons
1484
1498
  // thumbnailButton: document.getElementById("viewThumbnail"),
1485
1499
  // outlineButton: document.getElementById("viewOutline"),
1486
- // attachmentsButton: document.getElementById("viewAttachments"),
1500
+ attachmentsButton: document.getElementById("viewAttachments"),
1487
1501
  // layersButton: document.getElementById("viewLayers"),
1488
- // signaturesButton: document.getElementById("viewSignatures"),
1502
+ signaturesButton: document.getElementById("viewSignatures"),
1489
1503
  // Views
1490
1504
  // thumbnailView: document.getElementById("thumbnailView"),
1491
1505
  // outlineView: document.getElementById("outlineView"),
1492
- // attachmentsView: document.getElementById("attachmentsView"),
1506
+ attachmentsView: document.getElementById("attachmentsView"),
1493
1507
  // layersView: document.getElementById("layersView"),
1494
1508
  signaturesView: document.getElementById("signaturesView"),
1495
1509
  // View-specific options
1496
1510
  // outlineOptionsContainer: document.getElementById(
1497
1511
  // "outlineOptionsContainer"
1498
1512
  // ),
1499
- // currentOutlineItemButton: document.getElementById("currentOutlineItem"),
1513
+ currentOutlineItemButton: document.getElementById("currentOutlineItem"),
1500
1514
  },
1501
1515
  sidebarResizer: {
1502
1516
  outerContainer: document.getElementById('outerContainer'),
@@ -1565,9 +1579,9 @@ var component = normalizeComponent(
1565
1579
 
1566
1580
  ;// CONCATENATED MODULE: ./packages/ofdView/src/index.vue?vue&type=script&lang=js&
1567
1581
  /* harmony default export */ var ofdView_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_);
1568
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ofdView/src/index.vue?vue&type=style&index=0&id=7f7c718c&prod&scoped=true&lang=css&
1569
- var srcvue_type_style_index_0_id_7f7c718c_prod_scoped_true_lang_css_ = __webpack_require__(299);
1570
- ;// CONCATENATED MODULE: ./packages/ofdView/src/index.vue?vue&type=style&index=0&id=7f7c718c&prod&scoped=true&lang=css&
1582
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ofdView/src/index.vue?vue&type=style&index=0&id=7dfc8129&prod&scoped=true&lang=css&
1583
+ var srcvue_type_style_index_0_id_7dfc8129_prod_scoped_true_lang_css_ = __webpack_require__(979);
1584
+ ;// CONCATENATED MODULE: ./packages/ofdView/src/index.vue?vue&type=style&index=0&id=7dfc8129&prod&scoped=true&lang=css&
1571
1585
 
1572
1586
  ;// CONCATENATED MODULE: ./packages/ofdView/src/index.vue
1573
1587
 
@@ -1584,7 +1598,7 @@ var src_component = normalizeComponent(
1584
1598
  staticRenderFns,
1585
1599
  false,
1586
1600
  null,
1587
- "7f7c718c",
1601
+ "7dfc8129",
1588
1602
  null
1589
1603
 
1590
1604
  )