# Wijmo_Touch.Datatransfer

## Content

<div class="content__tsd">
						<div style="display:flex;justify-content:space-between;align-items:center">
							<h1>
								DataTransfer Class
							</h1>
						</div>
						<section class="tsd-comment">
							<div class="tsd-comment">
								<div class="lead">
									<p>Object used to hold the data that is being dragged during drag and drop operations.</p>
								</div>
								<p>It may hold one or more data items of different types. For more information about
									drag and drop operations and data transfer objects, see
								<a href="https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer">HTML Drag and Drop API</a>.</p>
								<p>This object is created automatically by the <a href="wijmo_touch.dragdroptouch.html">DragDropTouch</a> singleton and is
								accessible through the {@link dataTransfer} property of all drag events.</p>
							</div>
						</section>
						<section class="tsd-hierarchy">
							<h3>Heirarchy</h3>
							<ul class="tsd-hierarchy">
								<li>
									<span class="target">DataTransfer</span>
								</li>
							</ul>
						</section>
						<section class="tsd-index-group">
							<section class="tsd-index-panel">
								<div class="tsd-index-content">
									<section class="tsd-index-section ">
										<div class="title">
											<div class="gc_api_tree-item_icon_img_wrapper">
												<div class="gc_api_tree-item_icon_img" data-expand="true">
												</div>
											</div>
											<h3>
												Properties
											</h3>
										</div>
										<ul class="tsd-index-list">
											<li class="tsd-kind-property tsd-parent-kind-class"><a href="wijmo_touch.datatransfer.html#dropeffect" class="tsd-kind-icon">drop<wbr>Effect</a></li>
											<li class="tsd-kind-property tsd-parent-kind-class"><a href="wijmo_touch.datatransfer.html#effectallowed" class="tsd-kind-icon">effect<wbr>Allowed</a></li>
											<li class="tsd-kind-property tsd-parent-kind-class"><a href="wijmo_touch.datatransfer.html#types" class="tsd-kind-icon">types</a></li>
										</ul>
									</section>
									<section class="tsd-index-section ">
										<div class="title">
											<div class="gc_api_tree-item_icon_img_wrapper">
												<div class="gc_api_tree-item_icon_img" data-expand="true">
												</div>
											</div>
											<h3>
												Methods
											</h3>
										</div>
										<ul class="tsd-index-list">
											<li class="tsd-kind-method tsd-parent-kind-class"><a href="wijmo_touch.datatransfer.html#cleardata" class="tsd-kind-icon">clear<wbr>Data</a></li>
											<li class="tsd-kind-method tsd-parent-kind-class"><a href="wijmo_touch.datatransfer.html#getdata" class="tsd-kind-icon">get<wbr>Data</a></li>
											<li class="tsd-kind-method tsd-parent-kind-class"><a href="wijmo_touch.datatransfer.html#setdata" class="tsd-kind-icon">set<wbr>Data</a></li>
											<li class="tsd-kind-method tsd-parent-kind-class"><a href="wijmo_touch.datatransfer.html#setdragimage" class="tsd-kind-icon">set<wbr>Drag<wbr>Image</a></li>
										</ul>
									</section>
								</div>
							</section>
						</section>
						<section class="tsd-panel-group tsd-member-group ">
							<h2>Properties</h2>
							<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
								<a name="dropeffect" class="tsd-anchor"></a>
								<h3>dropEffect</h3>
								<div class="tsd-signature tsd-kind-icon">drop<wbr>Effect<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
								<aside class="tsd-sources">
								</aside>
								<div class="tsd-comment">
									<div class="lead">
										<p>Gets or sets the type of drag-and-drop operation currently selected.
										The value must be 'none',  'copy',  'link', or 'move'.</p>
									</div>
								</div>
							</section>
							<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
								<a name="effectallowed" class="tsd-anchor"></a>
								<h3>effectAllowed</h3>
								<div class="tsd-signature tsd-kind-icon">effect<wbr>Allowed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
								<aside class="tsd-sources">
								</aside>
								<div class="tsd-comment">
									<div class="lead">
										<p>Gets or sets the types of operations that are possible.
											Must be one of 'none', 'copy', 'copyLink', 'copyMove', 'link',
										'linkMove', 'move', 'all' or 'uninitialized'.</p>
									</div>
								</div>
							</section>
							<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
								<a name="types" class="tsd-anchor"></a>
								<h3>types</h3>
								<div class="tsd-signature tsd-kind-icon">types<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
								<aside class="tsd-sources">
								</aside>
								<div class="tsd-comment">
									<div class="lead">
										<p>Gets an array of strings giving the formats that were set in the
										<strong>dragstart</strong> event.</p>
									</div>
								</div>
							</section>
						</section>
						<section class="tsd-panel-group tsd-member-group ">
							<h2>Methods</h2>
							<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
								<a name="cleardata" class="tsd-anchor"></a>
								<h3>clearData</h3>
								<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
									<li class="tsd-signature tsd-kind-icon">clear<wbr>Data<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Removes the data associated with a given type.</p>
											</div>
											<p>The type argument is optional. If the type is empty or not specified, the data
												associated with all types is removed. If data for the specified type does not exist,
											or the data transfer contains no data, this method will have no effect.</p>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5><span class="tsd-flag ts-flagOptional">Optional</span> type: <span class="tsd-signature-type">string</span></h5>
												<div class="tsd-comment">
													<p>Type of data to remove.</p>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
									</li>
								</ul>
							</section>
							<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
								<a name="getdata" class="tsd-anchor"></a>
								<h3>getData</h3>
								<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
									<li class="tsd-signature tsd-kind-icon">get<wbr>Data<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Retrieves the data for a given type, or an empty string if data for that type does
												not exist or the data transfer contains no data.</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>type: <span class="tsd-signature-type">string</span></h5>
												<div class="tsd-comment">
													<p>Type of data to retrieve.</p>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
									</li>
								</ul>
							</section>
							<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
								<a name="setdata" class="tsd-anchor"></a>
								<h3>setData</h3>
								<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
									<li class="tsd-signature tsd-kind-icon">set<wbr>Data<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Set the data for a given type.</p>
											</div>
											<p>For a list of recommended drag types, please see
											<a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types">https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types</a>.</p>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>type: <span class="tsd-signature-type">string</span></h5>
												<div class="tsd-comment">
													<p>Type of data to add.</p>
												</div>
											</li>
											<li>
												<h5>value: <span class="tsd-signature-type">string</span></h5>
												<div class="tsd-comment">
													<p>Data to add.</p>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
									</li>
								</ul>
							</section>
							<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
								<a name="setdragimage" class="tsd-anchor"></a>
								<h3>setDragImage</h3>
								<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
									<li class="tsd-signature tsd-kind-icon">set<wbr>Drag<wbr>Image<span class="tsd-signature-symbol">(</span>img<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLElement</span>, offsetX<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offsetY<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Set the image to be used for dragging if a custom one is desired.</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>img: <span class="tsd-signature-type">HTMLElement</span></h5>
												<div class="tsd-comment">
													<p>An image element to use as the drag feedback image.</p>
												</div>
											</li>
											<li>
												<h5>offsetX: <span class="tsd-signature-type">number</span></h5>
												<div class="tsd-comment">
													<p>The horizontal offset within the image.</p>
												</div>
											</li>
											<li>
												<h5>offsetY: <span class="tsd-signature-type">number</span></h5>
												<div class="tsd-comment">
													<p>The vertical offset within the image.</p>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
									</li>
								</ul>
							</section>
						</section>
					</div>