Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
d7f10847
Commit
d7f10847
authored
6 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
removed too agressive preventDefault from input-observer
parent
655a0cf3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-util/input/input-observer.ts
+1
-17
1 addition, 17 deletions
src/mol-util/input/input-observer.ts
with
1 addition
and
17 deletions
src/mol-util/input/input-observer.ts
+
1
−
17
View file @
d7f10847
...
...
@@ -231,10 +231,6 @@ namespace InputObserver {
window
.
removeEventListener
(
'
resize
'
,
onResize
,
false
)
}
function
preventDefault
(
ev
:
Event
|
Touch
)
{
if
(
'
preventDefault
'
in
ev
)
ev
.
preventDefault
()
}
function
onContextMenu
(
event
:
Event
)
{
if
(
noContextMenu
)
{
event
.
preventDefault
()
...
...
@@ -273,8 +269,6 @@ namespace InputObserver {
}
function
onTouchStart
(
ev
:
TouchEvent
)
{
preventDefault
(
ev
)
if
(
ev
.
touches
.
length
===
1
)
{
buttons
=
ButtonsFlag
.
Primary
onPointerDown
(
ev
.
touches
[
0
])
...
...
@@ -286,13 +280,9 @@ namespace InputObserver {
}
}
function
onTouchEnd
(
ev
:
TouchEvent
)
{
preventDefault
(
ev
)
}
function
onTouchEnd
(
ev
:
TouchEvent
)
{}
function
onTouchMove
(
ev
:
TouchEvent
)
{
preventDefault
(
ev
)
if
(
ev
.
touches
.
length
===
1
)
{
buttons
=
ButtonsFlag
.
Primary
onPointerMove
(
ev
.
touches
[
0
])
...
...
@@ -313,22 +303,16 @@ namespace InputObserver {
}
function
onMouseDown
(
ev
:
MouseEvent
)
{
preventDefault
(
ev
)
buttons
=
getButtons
(
ev
)
onPointerDown
(
ev
)
}
function
onMouseMove
(
ev
:
MouseEvent
)
{
preventDefault
(
ev
)
buttons
=
getButtons
(
ev
)
onPointerMove
(
ev
)
}
function
onMouseUp
(
ev
:
MouseEvent
)
{
preventDefault
(
ev
)
buttons
=
getButtons
(
ev
)
onPointerUp
(
ev
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment