hayun-vite 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/data/sampleData.js +11 -11
- package/assets/templates/templAudiometry.js +348 -0
- package/assets/templates/{template_combo.js → templCombo.js} +5 -5
- package/index.html +44 -11
- package/index.js +3 -1
- package/package.json +1 -1
- package/src/Audiogram/test.js +37 -0
- package/src/Form/Form.js +57 -58
- package/src/Forms/Forms.js +62 -78
- package/src/Forms/test.js +18 -0
- package/src/Header/Header.js +4 -8
- package/src/MultiText/MultiText.js +12 -10
- package/src/Tympanogram/Tympanogram.js +213 -168
- package/src/Tympanogram/test.js +85 -0
- package/src/Tympanogram/units.js +17 -26
- package/src/common/putGrid.js +31 -0
- package/src/main.js +1 -2
- /package/{src/styles.css → styles.css} +0 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
import putLine from "./putLine";
|
2
|
+
|
3
|
+
export default function putGrid({ container }) {
|
4
|
+
const {x, y, width, height} = container.viewBox.baseVal
|
5
|
+
console.log(x, y, width, height);
|
6
|
+
|
7
|
+
const cord = { xStart: x, yStart: y, xEnd: width + x, yEnd: height + y, xStep: 1, yStep: 1 }
|
8
|
+
let { xStart, yStart, xEnd, yEnd, xStep, yStep } = cord
|
9
|
+
|
10
|
+
// رسم خطوط افقی
|
11
|
+
let style = 'stroke: blue; stroke-width: 0.05 ; stroke-opacity: 0.8; stroke-dasharray: 0.2;'
|
12
|
+
let x1 = xStart
|
13
|
+
let y1
|
14
|
+
|
15
|
+
let x2 = xEnd
|
16
|
+
let y2
|
17
|
+
|
18
|
+
for (let y1 = yStart; y1 <= yEnd; y1 += yStep) {
|
19
|
+
y2 = y1
|
20
|
+
putLine({ container, x1, y1, x2, y2, style, name: 'grid' })
|
21
|
+
}
|
22
|
+
|
23
|
+
// رسم خطوط عمودی
|
24
|
+
y1 = yStart
|
25
|
+
for (x1 = xStart; x1 <= xEnd; x1 += xStep) {
|
26
|
+
const x2 = x1
|
27
|
+
putLine({ container, x1, y1, x2, y2, style, name: 'grid' })
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
}
|
package/src/main.js
CHANGED
@@ -2,14 +2,13 @@
|
|
2
2
|
import Audiogram from "./Audiogram/Audiogram.js"
|
3
3
|
import Forms from "./Forms/Forms.js";
|
4
4
|
import { officeData, patientData } from "../assets/data/sampleData.js"
|
5
|
-
import template from "../assets/templates/
|
5
|
+
import template from "../assets/templates/templCombo.js";
|
6
6
|
import Tympanogram from "./Tympanogram/Tympanogram.js";
|
7
7
|
import Speech from "./Speech/Speech.js";
|
8
8
|
import Reflex from "./Reflex/Reflex.js";
|
9
9
|
import MultiText from "./MultiText/MultiText.js";
|
10
10
|
|
11
11
|
|
12
|
-
|
13
12
|
document.querySelector('#app').innerHTML = `
|
14
13
|
<div id="test"></div>
|
15
14
|
<div id="audiogram-div"></div>
|
File without changes
|