Skip to content

Commit

Permalink
Merge pull request #1885 from ProcessMaker/epic/FOUR-18036
Browse files Browse the repository at this point in the history
Merge epic/FOUR-18036 (Documentation PDF Print) to Release FALL 2024
  • Loading branch information
ryancooley authored Oct 22, 2024
2 parents 63fe279 + e074f9d commit 10beb3f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/components/modeler/Modeler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ export default {
return false;
},
},
forPrinting: {
type: Boolean,
default() {
return false;
},
},
},
mixins: [hotkeys, cloneSelection, linkEditing, transparentDragging],
data() {
Expand Down Expand Up @@ -540,9 +546,19 @@ export default {
},
},
methods: {
getSvg() {
const svg = document.querySelector('.mini-paper svg');
const css = 'text { font-family: sans-serif; }';
const style = document.createElement('style');
style.appendChild(document.createTextNode(css));
svg.appendChild(style);
const svgString = (new XMLSerializer()).serializeToString(svg);
return svgString;
},
mountedInit() {
store.commit('setReadOnly', this.readOnly);
store.commit('setForDocumenting', this.forDocumenting);
store.commit('setForPrinting', this.forPrinting);
this.graph = new dia.Graph();
store.commit('setGraph', this.graph);
this.graph.set('interactiveFunc', cellView => {
Expand Down Expand Up @@ -1466,6 +1482,7 @@ export default {
if (emitChangeEvent) {
window.ProcessMaker.EventBus.$emit('modeler-change');
}
window.ProcessMaker.EventBus.$emit('modeler-xml-loaded');
},
getBoundaryEvents(process) {
return process.get('flowElements').filter(({ $type }) => $type === 'bpmn:BoundaryEvent');
Expand Down
5 changes: 5 additions & 0 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default new Vuex.Store({
clientLeftPaper: false,
readOnly: false,
forDocumenting: false,
forPrinting: false,
isMultiplayer: false,
},
getters: {
Expand All @@ -62,6 +63,7 @@ export default new Vuex.Store({
clientLeftPaper: state => state.clientLeftPaper,
isReadOnly: state => state.readOnly,
isForDocumenting: state => state.forDocumenting,
isForPrinting: state => state.forPrinting,
showComponent: state => !state.readOnly,
showPanTool: state => state.forDocumenting,
isMultiplayer: state => state.isMultiplayer,
Expand All @@ -73,6 +75,9 @@ export default new Vuex.Store({
setForDocumenting(state, value) {
state.forDocumenting = value;
},
setForPrinting(state, value) {
state.forPrinting = value;
},
preventSavingElementPosition(state) {
state.allowSavingElementPosition = false;
},
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { saveDebounce } from '../../../src/components/inspectors/inspectorConsta
import path from 'path';
import { boundaryEventSelector, nodeTypes, taskSelector } from './constants';

const renderTime = 300;
const renderTime = 5000;

export function getTinyMceEditor() {
return cy
Expand Down

0 comments on commit 10beb3f

Please sign in to comment.