nodality 1.0.0-beta.1
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/dist/animator.cjs.js +1 -0
- package/dist/animator.esm.js +1 -0
- package/dist/audionew.cjs.js +1 -0
- package/dist/audionew.esm.js +1 -0
- package/dist/base.cjs.js +1 -0
- package/dist/base.esm.js +1 -0
- package/dist/betaDesktopBar.esm.js +1 -0
- package/dist/betaMobileBar.esm.js +1 -0
- package/dist/bundle.umd.js +1 -0
- package/dist/button.cjs.js +1 -0
- package/dist/button.esm.js +1 -0
- package/dist/cardGetter.cjs.js +1 -0
- package/dist/cardGetter.esm.js +1 -0
- package/dist/center.cjs.js +1 -0
- package/dist/center.esm.js +1 -0
- package/dist/checkbox.cjs.js +1 -0
- package/dist/checkbox.esm.js +1 -0
- package/dist/code.cjs.js +1 -0
- package/dist/code.esm.js +1 -0
- package/dist/container.cjs.js +1 -0
- package/dist/container.esm.js +1 -0
- package/dist/datalist.cjs.js +1 -0
- package/dist/datalist.esm.js +1 -0
- package/dist/designer.cjs.js +1 -0
- package/dist/designer.esm.js +1 -0
- package/dist/dropdown.cjs.js +1 -0
- package/dist/dropdown.esm.js +1 -0
- package/dist/elementMapper.cjs.js +1 -0
- package/dist/elementMapper.esm.js +1 -0
- package/dist/finalresult.esm.js +1 -0
- package/dist/flexCard.cjs.js +1 -0
- package/dist/flexCard.esm.js +1 -0
- package/dist/flexGrid.cjs.js +1 -0
- package/dist/flexGrid.esm.js +1 -0
- package/dist/flexRow.cjs.js +1 -0
- package/dist/flexRow.esm.js +1 -0
- package/dist/floatingInput.cjs.js +1 -0
- package/dist/floatingInput.esm.js +1 -0
- package/dist/free.cjs.js +1 -0
- package/dist/free.esm.js +1 -0
- package/dist/horizontalScroller.esm.js +1 -0
- package/dist/image.cjs.js +1 -0
- package/dist/image.esm.js +1 -0
- package/dist/imagePicker.cjs.js +1 -0
- package/dist/imagePicker.esm.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.esm.js +1 -0
- package/dist/link.cjs.js +1 -0
- package/dist/link.esm.js +1 -0
- package/dist/linkGetter.cjs.js +1 -0
- package/dist/linkGetter.esm.js +1 -0
- package/dist/metaAdder.cjs.js +1 -0
- package/dist/metaAdder.esm.js +1 -0
- package/dist/modal2025.cjs.js +1 -0
- package/dist/modal2025.esm.js +1 -0
- package/dist/multiswitchers.esm.js +1 -0
- package/dist/newNavBar.cjs.js +1 -0
- package/dist/newNavBar.esm.js +1 -0
- package/dist/picker.cjs.js +1 -0
- package/dist/picker.esm.js +1 -0
- package/dist/progress.cjs.js +1 -0
- package/dist/progress.esm.js +1 -0
- package/dist/radio.cjs.js +1 -0
- package/dist/radio.esm.js +1 -0
- package/dist/range.cjs.js +1 -0
- package/dist/range.esm.js +1 -0
- package/dist/sideBar.cjs.js +1 -0
- package/dist/sideBar.esm.js +1 -0
- package/dist/sideNavBar.cjs.js +1 -0
- package/dist/sideNavBar.esm.js +1 -0
- package/dist/simpleBar.cjs.js +1 -0
- package/dist/simpleBar.esm.js +1 -0
- package/dist/stack.cjs.js +1 -0
- package/dist/stack.esm.js +1 -0
- package/dist/table.cjs.js +1 -0
- package/dist/table.esm.js +1 -0
- package/dist/text.cjs.js +1 -0
- package/dist/text.esm.js +1 -0
- package/dist/textField.cjs.js +1 -0
- package/dist/textField.esm.js +1 -0
- package/dist/wrap.cjs.js +1 -0
- package/dist/wrap.esm.js +1 -0
- package/dist/zoomCard.cjs.js +1 -0
- package/dist/zoomCard.esm.js +1 -0
- package/layout/<head> +59 -0
- package/layout/DEADJOE +49 -0
- package/layout/DEPRECATED-PARAGRAPH.js +103 -0
- package/layout/animator.js +1915 -0
- package/layout/audio.js +145 -0
- package/layout/audionew.js +70 -0
- package/layout/base-2.js +92 -0
- package/layout/base.js +161 -0
- package/layout/betaDesktopBar.js +126 -0
- package/layout/betaMobileBar.js +293 -0
- package/layout/box.js +29 -0
- package/layout/button.js +516 -0
- package/layout/cards.js +136 -0
- package/layout/center.js +143 -0
- package/layout/checkbox.js +183 -0
- package/layout/cleanRow.js +775 -0
- package/layout/code.js +60 -0
- package/layout/container.js +1005 -0
- package/layout/custom.js +289 -0
- package/layout/divImage.js +209 -0
- package/layout/dropdown.js +154 -0
- package/layout/dropdown2025.js +152 -0
- package/layout/edit.sh +39 -0
- package/layout/emptyElement.js +21 -0
- package/layout/externalStylesheet.js +19 -0
- package/layout/flexCard.js +220 -0
- package/layout/flexGrid.js +192 -0
- package/layout/flexrow.js +866 -0
- package/layout/footer.js +83 -0
- package/layout/formComponents/custom.js +0 -0
- package/layout/formComponents/dataList.js +183 -0
- package/layout/formComponents/edit.sh +39 -0
- package/layout/formComponents/floatingInput.js +163 -0
- package/layout/formComponents/form-all.js +161 -0
- package/layout/formComponents/form.js +76 -0
- package/layout/formComponents/imagePicker.js +266 -0
- package/layout/formComponents/picker.js +208 -0
- package/layout/formComponents/radio.js +231 -0
- package/layout/formComponents/radiogroup.js +231 -0
- package/layout/formComponents/range.js +158 -0
- package/layout/free.js +232 -0
- package/layout/grid-new.js +299 -0
- package/layout/grid.js +190 -0
- package/layout/gridSwitcher.js +188 -0
- package/layout/group.js +163 -0
- package/layout/header.js +175 -0
- package/layout/hello.html +126 -0
- package/layout/horizontalScroller.js +222 -0
- package/layout/image-old.js +487 -0
- package/layout/image.js +1039 -0
- package/layout/index.js +183 -0
- package/layout/label.js +50 -0
- package/layout/link.js +1085 -0
- package/layout/list-OLD.js +0 -0
- package/layout/list.js +127 -0
- package/layout/metaAdder.js +17 -0
- package/layout/modal2025.js +142 -0
- package/layout/modernwrap.js +92 -0
- package/layout/multiswitcher.js +224 -0
- package/layout/multiswitcherBeta.js +63 -0
- package/layout/navBar-OLD.js +261 -0
- package/layout/navBar.js +371 -0
- package/layout/navFactor/customDiv.js +60 -0
- package/layout/navFactor/edit.sh +39 -0
- package/layout/newFlatAdder.js +41 -0
- package/layout/newNavBar copy 2.js +915 -0
- package/layout/newNavBar copy.js +774 -0
- package/layout/newNavBar.js +925 -0
- package/layout/offsetContainer.js +395 -0
- package/layout/progress.js +111 -0
- package/layout/remWin.sh +20 -0
- package/layout/row.js +208 -0
- package/layout/savedNewNavBar.js +437 -0
- package/layout/scrollvideo.js +120 -0
- package/layout/sideBar.js +183 -0
- package/layout/sideNavBar.js +313 -0
- package/layout/simpleBar.js +25 -0
- package/layout/slider2025.js +198 -0
- package/layout/spacer.js +44 -0
- package/layout/stack.js +76 -0
- package/layout/styler.js +113 -0
- package/layout/switcher.js +102 -0
- package/layout/table.js +155 -0
- package/layout/text.js +1685 -0
- package/layout/textField.js +282 -0
- package/layout/ulist.js +147 -0
- package/layout/video.js +70 -0
- package/layout/withoutNew.js +60 -0
- package/layout/wrap.js +140 -0
- package/layout/zoomCard.js +219 -0
- package/lib/cardGetter.js +80 -0
- package/lib/designer.js +875 -0
- package/lib/elementMapper.js +1428 -0
- package/lib/linkGetter.js +202 -0
- package/package.json +33 -0
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import {Animator} from "./animator.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
class ExactImage {
|
|
6
|
+
constructor(url){
|
|
7
|
+
this.image(url);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
image(url, value, direction){
|
|
11
|
+
|
|
12
|
+
// this.el = null;
|
|
13
|
+
let query = window.matchMedia("(max-device-width: 415px)");
|
|
14
|
+
let back = document.createElement("div");
|
|
15
|
+
back.style.backgroundColor = "#ecf0f1";
|
|
16
|
+
back.style.width = "100%";
|
|
17
|
+
back.style.height = "200";
|
|
18
|
+
|
|
19
|
+
if (query.matches){
|
|
20
|
+
back.style.height = "500";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
back.style.backgroundImage = `url(${url})`;
|
|
24
|
+
back.style.backgroundPosition = "center center";
|
|
25
|
+
back.style.backgroundSize = "cover";
|
|
26
|
+
back.style.borderTopLeftRadius = `${value}px`;
|
|
27
|
+
back.style.borderTopRightRadius = `${value}px`;
|
|
28
|
+
|
|
29
|
+
this.el = back;
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
render(){
|
|
35
|
+
return this.el;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
class Imager extends Animator {
|
|
41
|
+
constructor(url, type, mode) {
|
|
42
|
+
super();
|
|
43
|
+
this.url = url;
|
|
44
|
+
this.res = null;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
if (type == "exact"){
|
|
50
|
+
this.image(this.url, mode);
|
|
51
|
+
} else {
|
|
52
|
+
this.setup();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
toSticky(){
|
|
57
|
+
this.res.style.position = "sticky";
|
|
58
|
+
this.res.style.top = "0px";
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
setID(id){
|
|
63
|
+
this.res.setAttribute("id", id);
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
square(){
|
|
68
|
+
this.res.style.width = "30%";
|
|
69
|
+
this.res.style.paddingBottom = "30%";
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
opacity(value){
|
|
75
|
+
this.res.style.opacity = `${value}`;
|
|
76
|
+
return this;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
setGrid(){
|
|
81
|
+
this.res.style.gridRow = "span 2";
|
|
82
|
+
this.res.style.gridColumn= "span 3";
|
|
83
|
+
//this.res.style.gridColumn = "span 3";
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
transform(str){
|
|
88
|
+
this.res.style.transform = str; //"rotate3d(.5,-.866,0,15deg) rotate(60deg)";
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
offset(){
|
|
93
|
+
this.res.style.marginLeft = "-60px";
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
offseta(){
|
|
98
|
+
this.res.style.marginLeft = "90px";
|
|
99
|
+
this.res.style.marginTop = "-30px";
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
borderAround(data){
|
|
104
|
+
this.res.style.border = data;
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
setClass(name){
|
|
109
|
+
this.res.setAttribute("class", name);
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
scale(obj){
|
|
114
|
+
|
|
115
|
+
let previousWidth = this.res.style.width;
|
|
116
|
+
|
|
117
|
+
this.res.style.transition= "0.5s all";
|
|
118
|
+
// alert(previousWidth);
|
|
119
|
+
|
|
120
|
+
this.res.addEventListener("mouseover", () => {
|
|
121
|
+
let previousWidth = this.res.style.width;
|
|
122
|
+
this.res.style.transform = "scale(1.04)";
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
this.res.addEventListener("mouseout", () => {
|
|
126
|
+
let previousWidth = this.res.style.width;
|
|
127
|
+
this.res.style.transform = "scale(1.0)";
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
onTap(e) {
|
|
136
|
+
this.res.addEventListener("click", e);
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
border(corners){
|
|
141
|
+
this.res.style.borderTopLeftRadius = "16px";
|
|
142
|
+
this.res.style.borderTopRightRadius = "16px";
|
|
143
|
+
return this;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
allRound(dimensions){
|
|
147
|
+
this.res.style.borderRadius = dimensions;
|
|
148
|
+
return this;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
mobileWidth(){
|
|
153
|
+
let query = window.matchMedia("(max-device-width: 415px)");
|
|
154
|
+
if (query.matches){
|
|
155
|
+
this.res.style.width = "120%";
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
return this;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
image(url, mode, value, direction){
|
|
163
|
+
|
|
164
|
+
// this.el = null;
|
|
165
|
+
let query = window.matchMedia("(max-device-width: 415px)");
|
|
166
|
+
let back = document.createElement("div");
|
|
167
|
+
//back.style.backgroundColor = "#ecf0f1";
|
|
168
|
+
back.style.width = "100%";
|
|
169
|
+
back.style.height = "200";
|
|
170
|
+
|
|
171
|
+
if (query.matches){
|
|
172
|
+
back.style.height = "500";
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
back.style.backgroundImage = `url(${url})`;
|
|
176
|
+
back.style.backgroundPosition = "center center";
|
|
177
|
+
// back.style.backgroundRepeatX = "no-repeat";
|
|
178
|
+
back.style.backgroundRepeat = "no-repeat";
|
|
179
|
+
|
|
180
|
+
back.style.backgroundSize = "cover";
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
if (mode === "contain"){
|
|
184
|
+
back.style.backgroundSize = "contain";
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
back.style.borderTopLeftRadius = `${value}px`;
|
|
189
|
+
back.style.borderTopRightRadius = `${value}px`;
|
|
190
|
+
|
|
191
|
+
this.res = back;
|
|
192
|
+
return this;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
arrayPadding(arr, value) {
|
|
196
|
+
if (arr.includes("left")){
|
|
197
|
+
this.res.style.paddingLeft = value;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if (arr.includes("right")){
|
|
201
|
+
this.res.style.paddingRight = value;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (arr.includes("top")){
|
|
205
|
+
this.res.style.paddingTop = value;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (arr.includes("bottom")){
|
|
209
|
+
this.res.style.paddingBottom = value;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
return this;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
arrayMargin(arr, value) {
|
|
218
|
+
if (arr.includes("left")){
|
|
219
|
+
this.res.style.marginLeft = value;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (arr.includes("right")){
|
|
223
|
+
this.res.style.marginRight = value;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (arr.includes("top")){
|
|
227
|
+
this.res.style.marginTop = value;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (arr.includes("bottom")){
|
|
231
|
+
this.res.style.marginBottom = value;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
return this;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
setup() {
|
|
240
|
+
let img = document.createElement("img");
|
|
241
|
+
img.style.width = "100%";
|
|
242
|
+
//img.style.height = "auto";
|
|
243
|
+
img.src = this.url;
|
|
244
|
+
this.res = img;
|
|
245
|
+
return this;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
autoW(){
|
|
249
|
+
this.res.style.width = "initial";
|
|
250
|
+
return this;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
float(dir){
|
|
254
|
+
this.res.style.float = `${dir}`;
|
|
255
|
+
return this;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
fillAvailable(){
|
|
259
|
+
this.res.style.height = "-webkit-fill-available";
|
|
260
|
+
return this;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
flex(val){
|
|
267
|
+
this.res.style.flex = 1;
|
|
268
|
+
return this;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
height(h){
|
|
272
|
+
this.res.style.height = h;
|
|
273
|
+
this.res.style.width = "auto";
|
|
274
|
+
return this;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
expand(obj){
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
const convert = (value) => {
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
var convertedValue = value;
|
|
292
|
+
|
|
293
|
+
if ((value.includes("%")) || value.includes("px")){
|
|
294
|
+
|
|
295
|
+
convertedValue = convertedValue.substr(0, 2);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
if (value.includes("%")){
|
|
301
|
+
return Number(convertedValue / 100 * window.innerWidth);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (value.includes("px")){
|
|
305
|
+
return Number(convertedValue);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
const check = () => {
|
|
311
|
+
let mq = window.matchMedia(`(min-width: ${obj.at})`);
|
|
312
|
+
|
|
313
|
+
if (mq.matches){
|
|
314
|
+
// alert("MATCH")
|
|
315
|
+
this.res.style.width = `${obj.width}`;
|
|
316
|
+
|
|
317
|
+
let newWidth = window.innerWidth / 2 - convert(obj.width) / 2;
|
|
318
|
+
// alert(newWidth);
|
|
319
|
+
this.res.style.marginLeft = `${newWidth}px`; // `calc(${window.innerWidth}-${obj.width} / 2)`;
|
|
320
|
+
} else {
|
|
321
|
+
this.res.style.width = `100%`;
|
|
322
|
+
this.res.style.marginLeft = `0px`;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
let mqa = window.matchMedia(`(max-device-width: 415px)`);
|
|
327
|
+
if (mqa.matches){
|
|
328
|
+
this.res.style.width = `100%`;
|
|
329
|
+
this.res.style.marginLeft = `0px`;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
check();
|
|
337
|
+
|
|
338
|
+
window.addEventListener("resize", check);
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
return this;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/*center(w){
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
const adj = () => {
|
|
348
|
+
if (this.res.style.width != 0){
|
|
349
|
+
let count = window.innerWidth / 2 - (((w * window.innerWidth) / 100) / 2);
|
|
350
|
+
this.res.style.marginLeft = `${count}px`;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
adj();
|
|
356
|
+
window.onresize = adj();
|
|
357
|
+
return this;
|
|
358
|
+
}*/
|
|
359
|
+
|
|
360
|
+
width(w){
|
|
361
|
+
this.res.style.width = w;
|
|
362
|
+
this.res.style.height = "auto";
|
|
363
|
+
return this;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
margin(L, T, R, B) {
|
|
367
|
+
if (L || T || R || B){ // CAUGHT MYSELF
|
|
368
|
+
this.res.style.marginLeft = L;
|
|
369
|
+
this.res.style.marginTop = T;
|
|
370
|
+
this.res.style.marginRight = R;
|
|
371
|
+
this.res.style.marginBottom = B;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
if (!T && !R && !B){
|
|
375
|
+
|
|
376
|
+
if (T !== 0 || R !== 0 || B !== 0){
|
|
377
|
+
// alert("j")
|
|
378
|
+
this.res.style.margin = L;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
return this;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
padding(el){
|
|
389
|
+
this.res.style.padding = el;
|
|
390
|
+
return this;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
size(w, h) {
|
|
394
|
+
if (w && h) {
|
|
395
|
+
this.res.style.width = w;
|
|
396
|
+
this.res.style.height = h;
|
|
397
|
+
} else {
|
|
398
|
+
this.res.style.width = w;
|
|
399
|
+
this.res.style.height = w;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
return this;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
frame(obj) {
|
|
408
|
+
let w = obj.width;
|
|
409
|
+
let h = obj.height;
|
|
410
|
+
|
|
411
|
+
if (w && h) {
|
|
412
|
+
this.res.style.width = w;
|
|
413
|
+
this.res.style.height = h;
|
|
414
|
+
} else {
|
|
415
|
+
this.res.style.width = w;
|
|
416
|
+
this.res.style.height = w;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
return this;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
RSize(w, h, ratio) {
|
|
425
|
+
|
|
426
|
+
let mq = window.matchMedia("(max-device-width: 420px)");
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
if (w && h) {
|
|
430
|
+
|
|
431
|
+
this.res.style.width = mq.matches ? w * ratio : w;
|
|
432
|
+
this.res.style.height = mq.matches ? h * ratio : h;
|
|
433
|
+
} else {
|
|
434
|
+
this.res.style.width = mq.matches ? w * ratio : w;
|
|
435
|
+
this.res.style.height = mq.matches ? w * ratio : w;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
return this;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
shadow(obj){
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
if (obj.type === "mild"){
|
|
451
|
+
this.res.style.boxShadow = `0px 3px 15px rgba(0,0,0,0.2)`;
|
|
452
|
+
} else {
|
|
453
|
+
this.res.style.boxShadow = `${obj.x}px ${obj.y}px ${obj.radius}px ${obj.color}`;
|
|
454
|
+
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
return this;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
clipShape(shape) {
|
|
465
|
+
this.res.style.borderRadius = "50%";
|
|
466
|
+
return this;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
cornerRadius(val){
|
|
470
|
+
this.res.style.borderRadius = val;
|
|
471
|
+
return this;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
render(el) {
|
|
475
|
+
if (el) {
|
|
476
|
+
document.querySelector(el).appendChild(this.res);
|
|
477
|
+
} else {
|
|
478
|
+
return this.res;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
window.ExactImage
|
|
484
|
+
Imager = ExactImage
|
|
485
|
+
Imager;
|
|
486
|
+
export { ExactImage
|
|
487
|
+
Imager };
|