drag

Draggable borderless window in CefSharp

删除回忆录丶 提交于 2019-12-01 01:45:59
I want to implement borderless window with drag logic on some HTML element. I found some working examples (like frameless window for Chrome ) and this is what I've tried: .title-area { -webkit-app-region: drag; } <div class='title-area'> A draggable area </div> Then, in C# code I've implemented IDragHandler class: internal class PromtDragHandler : IDragHandler { bool IDragHandler.OnDragEnter(IWebBrowser browserControl, IBrowser browser, IDragData dragData, DragOperationsMask mask) { return false; } void IDragHandler.OnDraggableRegionsChanged(IWebBrowser browserControl, IBrowser browser, IList

iphone mapkit drag and get center location

爷,独闯天下 提交于 2019-11-30 22:48:40
HI, I have a Mapview with some marker points + a marker for current location. Now, what I want to do here is, when user drag or traverse through mapview, I want to find coordinate (latitude, longitude) of the new center location after map has been dragged. I want to clarify once again, I am not talking about dragging the marker/point, I am talking about dragging the map with touch. Thanks in advance. Look for theMapView.region.center or theMapView.centerCoordinate (should be the same) in your MapView's delegate -mapView:regionDidChangeAnimated: method. Judging by this document: http:/

Dragable objects in WPF in an ItemsControl?

好久不见. 提交于 2019-11-30 21:33:11
I want to be able to implement an ItemsControl with dragable items. The reason for the ItemsControl is so I can bind to my ViewModel in the background. I've tried using a Thumb Control in a canvas and it works perfect, except as soon as I stick it in an ItemsControl it stops working. Here is what I tried: <ItemsControl ItemsSource="{Binding MyItems}"> <ItemsControl.ItemTemplate> <DataTemplate> <Thumb Canvas.Left="0" Canvas.Top="0" Width="50" Height="50" DragDelta="MyThumb_DragDelta"/> </DataTemplate> </ItemsControl.ItemTemplate> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Canvas /> <

Draggable borderless window in CefSharp

自闭症网瘾萝莉.ら 提交于 2019-11-30 21:11:48
问题 I want to implement borderless window with drag logic on some HTML element. I found some working examples (like frameless window for Chrome) and this is what I've tried: .title-area { -webkit-app-region: drag; } <div class='title-area'> A draggable area </div> Then, in C# code I've implemented IDragHandler class: internal class PromtDragHandler : IDragHandler { bool IDragHandler.OnDragEnter(IWebBrowser browserControl, IBrowser browser, IDragData dragData, DragOperationsMask mask) { return

iphone mapkit drag and get center location

萝らか妹 提交于 2019-11-30 17:50:10
问题 HI, I have a Mapview with some marker points + a marker for current location. Now, what I want to do here is, when user drag or traverse through mapview, I want to find coordinate (latitude, longitude) of the new center location after map has been dragged. I want to clarify once again, I am not talking about dragging the marker/point, I am talking about dragging the map with touch. Thanks in advance. 回答1: Look for theMapView.region.center or theMapView.centerCoordinate (should be the same) in

Imageview issue with zoom in and out,drag with maximum and minimum levels

纵饮孤独 提交于 2019-11-30 16:56:40
I had implemented an image view with the zoom and drag functionalities.I am using matrix for the zoom and drag functionality.But my problem is that I cant set my minimum and maximum zoom level and the drag space limit.can any on e tell me how I can do that. private float spacing(MotionEvent event) { float x = event.getX(0) - event.getX(1); float y = event.getY(0) - event.getY(1); return FloatMath.sqrt(x * x + y * y); } private void midPoint(PointF point, MotionEvent event) { float x = event.getX(0) + event.getX(1); float y = event.getY(0) + event.getY(1); point.set(x / 2, y / 2); } private

Use UIPanGestureRecognizer to drag UIView inside limited area

独自空忆成欢 提交于 2019-11-30 16:26:33
I want to allow user to drag UIView inside a limited area of its super view. Trying the following simple code: func handlePanForImage(recognizer: UIPanGestureRecognizer) { if let myView = recognizer.view { switch (recognizer.state) { case .Changed: let translation = recognizer.translationInView(self) if insideDraggableArea(myView.center) { myView.center = CGPoint(x:recognizer.view!.center.x + translation.x, y:recognizer.view!.center.y + translation.y) recognizer.setTranslation(CGPointZero, inView: self) } default: break } } } I see that indeed the view is not dragged outside the limited area,

Changing dragshadow in android, while dragging happens

倾然丶 夕夏残阳落幕 提交于 2019-11-30 15:57:54
问题 Faced the problem of letting the dragshaddow (created by a DragShadowBuilder) react on something, while dragging is happening. Do someone know how it supposed to be done? 回答1: Here's my complete code for custom drag shadow builder (gist for custom drag shadow). However, as others stated there is no possibility to modify drag shadow using native functionality introduced in API-11. package com.marcingil.dragshadow; import android.content.Context; import android.graphics.Bitmap; import android

Changing dragshadow in android, while dragging happens

大憨熊 提交于 2019-11-30 14:57:26
Faced the problem of letting the dragshaddow (created by a DragShadowBuilder ) react on something, while dragging is happening. Do someone know how it supposed to be done? Here's my complete code for custom drag shadow builder ( gist for custom drag shadow) . However, as others stated there is no possibility to modify drag shadow using native functionality introduced in API-11. package com.marcingil.dragshadow; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Point; import android.graphics.drawable.BitmapDrawable; import

Dragging a Div in jQuery - fine when mouse is slow, but fails on fast mouse movement

我的梦境 提交于 2019-11-30 12:21:16
问题 I want to drag a div around using my own jQuery code. This example on jsfiddle works fine when the mouse movements are slow http://jsfiddle.net/craic/kr7Un/ But any fast movement pulls the mouse out of the box and the tracking is lost. jQuery UI draggable doesn't have this problem and tracks just fine regardless of how fast you move: http://jqueryui.com/demos/draggable/ But I want to roll my own simple version so that I can integrate it with Raphael, key presses, etc. I've looked at the