@@ -131,6 +131,87 @@ public string Dir
131
131
}
132
132
}
133
133
134
+ public bool movable { get ; set ; }
135
+ [ ContextProperty ( "Перемещаемый" , "Movable" ) ]
136
+ public bool Movable
137
+ {
138
+ get { return movable ; }
139
+ set
140
+ {
141
+ movable = value ;
142
+ string strFunc ;
143
+ if ( value )
144
+ {
145
+ strFunc = "mapKeyEl.get('" + ItemKey + "')['movable'] = " + movable . ToString ( ) . ToLower ( ) + ";" ;
146
+ strFunc += @"
147
+ mapKeyDraggableEl.set('" + ItemKey + "', mapKeyEl.get('" + ItemKey + @"'));
148
+ function dragElement" + ItemKey + @"() {
149
+ let elmnt = mapKeyDraggableEl.get('" + ItemKey + @"');
150
+ //alert('' + elmnt);
151
+ if (elmnt != undefined)
152
+ {
153
+ var pos1 = 0;
154
+ var pos2 = 0;
155
+ var pos3 = 0;
156
+ var pos4 = 0;
157
+ elmnt.onmousedown = dragMouseDown;
158
+ function dragMouseDown(e)
159
+ {
160
+ e = e || window.event;
161
+ e.preventDefault();
162
+ pos3 = e.clientX;
163
+ pos4 = e.clientY;
164
+ document.onmouseup = closeDragElement;
165
+ document.onmousemove = elementDrag;
166
+ }
167
+ function elementDrag(e)
168
+ {
169
+ e = e || window.event;
170
+ e.preventDefault();
171
+ pos1 = pos3 - e.clientX;
172
+ pos2 = pos4 - e.clientY;
173
+ pos3 = e.clientX;
174
+ pos4 = e.clientY;
175
+ elmnt.style.top = (elmnt.offsetTop - pos2) + 'px';
176
+ elmnt.style.left = (elmnt.offsetLeft - pos1) + 'px';
177
+ }
178
+ function closeDragElement()
179
+ {
180
+ document.onmouseup = null;
181
+ document.onmousemove = null;
182
+ }
183
+ }
184
+ else
185
+ {
186
+ mapKeyEl.get('" + ItemKey + @"').onmousedown = null;
187
+ }
188
+ }
189
+ dragElement" + ItemKey + "();" ;
190
+ }
191
+ else
192
+ {
193
+ strFunc = @"
194
+ mapKeyDraggableEl.delete('" + ItemKey + @"');
195
+ function dragElement" + ItemKey + @"() { mapKeyEl.get('" + ItemKey + @"').onmousedown = null; }
196
+ dragElement" + ItemKey + "();" ;
197
+ }
198
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
199
+ }
200
+ }
201
+
202
+ public bool draggable { get ; set ; }
203
+ [ ContextProperty ( "Перетаскиваемый" , "Draggable" ) ]
204
+ public bool Draggable
205
+ {
206
+ get { return draggable ; }
207
+ set
208
+ {
209
+ draggable = value ;
210
+ string strFunc = "mapKeyEl.get('" + ItemKey + "')['draggable'] = " + draggable . ToString ( ) . ToLower ( ) + ";" ;
211
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
212
+ }
213
+ }
214
+
134
215
public int tabIndex { get ; set ; }
135
216
[ ContextProperty ( "ПорядокОбхода" , "TabIndex" ) ]
136
217
public int TabIndex
@@ -243,6 +324,20 @@ public ArrayImpl Children
243
324
get { return children ; }
244
325
}
245
326
327
+ public DfAction drop { get ; set ; }
328
+ [ ContextProperty ( "Бросить" , "Drop" ) ]
329
+ public DfAction Drop
330
+ {
331
+ get { return drop ; }
332
+ set
333
+ {
334
+ drop = value ;
335
+ string strFunc = "mapKeyEl.get(\u0022 " + ItemKey + "\u0022 ).addEventListener(\u0022 drop\u0022 , doEvent);" ;
336
+ strFunc += "mapKeyEl.get(\u0022 " + ItemKey + "\u0022 ).addEventListener(\u0022 dragover\u0022 , doEvent);" ;
337
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
338
+ }
339
+ }
340
+
246
341
public DfAction dblclick { get ; set ; }
247
342
[ ContextProperty ( "ДвойноеНажатие" , "DoubleClick" ) ]
248
343
public DfAction DoubleClick
@@ -256,6 +351,19 @@ public DfAction DoubleClick
256
351
}
257
352
}
258
353
354
+ public DfAction dragend { get ; set ; }
355
+ [ ContextProperty ( "КонецПеретаскивания" , "DragEnd" ) ]
356
+ public DfAction DragEnd
357
+ {
358
+ get { return dragend ; }
359
+ set
360
+ {
361
+ dragend = value ;
362
+ string strFunc = "mapKeyEl.get(\u0022 " + ItemKey + "\u0022 ).addEventListener(\u0022 dragend\u0022 , doEvent);" ;
363
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
364
+ }
365
+ }
366
+
259
367
public DfAction mouseover { get ; set ; }
260
368
[ ContextProperty ( "МышьНадЭлементом" , "MouseOver" ) ]
261
369
public DfAction MouseOver
@@ -282,6 +390,19 @@ public DfAction MouseOut
282
390
}
283
391
}
284
392
393
+ public DfAction dragenter { get ; set ; }
394
+ [ ContextProperty ( "НадЦелью" , "DragEnter" ) ]
395
+ public DfAction DragEnter
396
+ {
397
+ get { return dragenter ; }
398
+ set
399
+ {
400
+ dragenter = value ;
401
+ string strFunc = "mapKeyEl.get(\u0022 " + ItemKey + "\u0022 ).addEventListener(\u0022 dragenter\u0022 , doEvent);" ;
402
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
403
+ }
404
+ }
405
+
285
406
public DfAction click { get ; set ; }
286
407
[ ContextProperty ( "Нажатие" , "Click" ) ]
287
408
public DfAction Click
@@ -295,6 +416,32 @@ public DfAction Click
295
416
}
296
417
}
297
418
419
+ public DfAction dragstart { get ; set ; }
420
+ [ ContextProperty ( "НачалоПеретаскивания" , "DragStart" ) ]
421
+ public DfAction DragStart
422
+ {
423
+ get { return dragstart ; }
424
+ set
425
+ {
426
+ dragstart = value ;
427
+ string strFunc = "mapKeyEl.get(\u0022 " + ItemKey + "\u0022 ).addEventListener(\u0022 dragstart\u0022 , doEvent);" ;
428
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
429
+ }
430
+ }
431
+
432
+ public DfAction mousedown { get ; set ; }
433
+ [ ContextProperty ( "ПриНажатииМыши" , "MouseDown" ) ]
434
+ public DfAction MouseDown
435
+ {
436
+ get { return mousedown ; }
437
+ set
438
+ {
439
+ mousedown = value ;
440
+ string strFunc = "mapKeyEl.get(\u0022 " + ItemKey + "\u0022 ).addEventListener(\u0022 mousedown\u0022 , doEvent);" ;
441
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
442
+ }
443
+ }
444
+
298
445
public DfAction mouseup { get ; set ; }
299
446
[ ContextProperty ( "ПриОтпусканииМыши" , "MouseUp" ) ]
300
447
public DfAction MouseUp
@@ -308,6 +455,19 @@ public DfAction MouseUp
308
455
}
309
456
}
310
457
458
+ public DfAction mousemove { get ; set ; }
459
+ [ ContextProperty ( "ПриПеремещенииМыши" , "MouseMove" ) ]
460
+ public DfAction MouseMove
461
+ {
462
+ get { return mousemove ; }
463
+ set
464
+ {
465
+ mousemove = value ;
466
+ string strFunc = "mapKeyEl.get(\u0022 " + ItemKey + "\u0022 ).addEventListener(\u0022 mousemove\u0022 , doEvent);" ;
467
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
468
+ }
469
+ }
470
+
311
471
public DfAction focus { get ; set ; }
312
472
[ ContextProperty ( "ФокусПолучен" , "Focused" ) ]
313
473
public DfAction Focused
@@ -334,6 +494,19 @@ public DfAction LostFocus
334
494
}
335
495
}
336
496
497
+ public DfAction dragleave { get ; set ; }
498
+ [ ContextProperty ( "ЦельПокинута" , "DragLeave" ) ]
499
+ public DfAction DragLeave
500
+ {
501
+ get { return dragleave ; }
502
+ set
503
+ {
504
+ dragleave = value ;
505
+ string strFunc = "mapKeyEl.get(\u0022 " + ItemKey + "\u0022 ).addEventListener(\u0022 dragleave\u0022 , doEvent);" ;
506
+ DeclarativeForms . SendStrFunc ( strFunc ) ;
507
+ }
508
+ }
509
+
337
510
[ ContextMethod ( "Анимация" , "Animation" ) ]
338
511
public DfAnimation Animation ( DfFrames p1 , DfAnimationOptions p2 )
339
512
{
0 commit comments