Skip to content

Commit

Permalink
Merge pull request #578 from RabotaRu/v3.13.2
Browse files Browse the repository at this point in the history
v3.13.2
  • Loading branch information
rpiontik authored Nov 2, 2024
2 parents 60d2c9a + 7bd2200 commit a3b6de6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 29 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/documentation/docs/conception/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ DocHub - инструмент описания архитектуры через
3. [Управление архитектурой холдинга (экосистем)](#ecosystem);
4. [Создание архитектурных фасадов](#facade).


![](@anchor/versions)
## 1. Управление версиями архитектуры
![>Управление версиями](@document/dochub.archver)
Expand Down
3 changes: 0 additions & 3 deletions public/documentation/docs/welcome.md

This file was deleted.

6 changes: 5 additions & 1 deletion src/frontend/components/Docs/DocMarkdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
tocShow: {
type: Boolean,
default: true
},
inline: {
type: Boolean,
default: true
}
},
data() {
Expand Down Expand Up @@ -177,7 +181,7 @@
tocRendered(tocHTML) {
// Не выводим оглавление, если в нем всего три раздела или меньше
// eslint-disable-next-line no-useless-escape
if (this.tocShow && ((tocHTML.match(/\<li\>.*\<\/li\>/g) || []).length > 3))
if (!this.inline && this.tocShow && ((tocHTML.match(/\<li\>.*\<\/li\>/g) || []).length > 3))
this.toc = tocHTML;
},
prepareMarkdown(content) {
Expand Down
40 changes: 16 additions & 24 deletions src/frontend/components/Schema/PlantUML.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
],
data() {
return {
original: null,
menu: { // Контекстное меню
show: false, // Признак отображения
x : 0, // Позиция x
Expand Down Expand Up @@ -145,18 +144,21 @@
return this.svgEl;
},
viewBox() {
if (!this.svgEl) {
return {
x: 0,
y : 0,
width : 0,
height : 0
};
} else
return this.cacheViewBox ?
this.cacheViewBox
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
: this.cacheViewBox = this.svgEl.viewBox.baseVal;
if (this.cacheViewBox) return this.cacheViewBox;
let result = null;
if (navigator.userAgent.toLowerCase().includes('firefox')) {
// eslint-disable-next-line no-useless-escape
const regex = /<svg.*?viewBox=\"(-?(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?)\s*(-?(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?)\s*(-?(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?)\s*(-?(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?)\".*?>/;
const parsed = this.svg.match(regex);
parsed && (result = {
x: Number.parseFloat(parsed[1]),
y: Number.parseFloat(parsed[2]),
width: Number.parseFloat(parsed[3]),
height: Number.parseFloat(parsed[4])
});
} else if (this.svgEl) result = this.svgEl.viewBox.baseVal;
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
return result ? (this.cacheViewBox = result) : { x:0, y:0, width:0, height:0 };
},
menuItems() {
const result = [].concat(this.contextMenu);
Expand Down Expand Up @@ -206,6 +208,7 @@
},
doResize() {
if (!this.svgEl || !this.svgEl.clientWidth || !this.svgEl.clientHeight) return;
const originWidth = this.viewBox.width;
if (this.$el.clientWidth > this.viewBox.width) {
Expand All @@ -227,17 +230,6 @@
this.viewBox.x -= offsetX;
this.viewBox.y -= offsetY > 0 ? offsetY : 0;
},
saveOriginal() {
const originalHeight = this.viewBox.height * (this.svgEl.clientWidth / this.viewBox.width);
this.original = {
height: originalHeight,
viewBoxHeight: this.$el.clientHeight * this.viewBox.height / originalHeight
};
},
resetToDefault() {
this.viewBox.height = this.original.viewBoxHeight;
this.svgEl.style.height = this.original.height;
},
prepareSVG() {
this.svgEl = this.$el.querySelectorAll('svg')[0];
this.cacheViewBox = null;
Expand Down

0 comments on commit a3b6de6

Please sign in to comment.