Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
disagg-d3
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
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
disagg-d3
Compare revisions
8cd673e6647d17fdd27c568af74d3448dac281c0 to 32b5f9f69ed34ce844c1fb34560afd882e659e01
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
ghsc/nshmp/disagg-d3
Select target project
No results found
32b5f9f69ed34ce844c1fb34560afd882e659e01
Select Git revision
Swap
Target
ghsc/nshmp/disagg-d3
Select target project
ghsc/nshmp/disagg-d3
1 result
8cd673e6647d17fdd27c568af74d3448dac281c0
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
add scaling factor for draging
· 56c0f260
Clayton, Brandon Scott
authored
5 months ago
56c0f260
Merge branch 'drag' into 'main'
· 32b5f9f6
Clayton, Brandon Scott
authored
5 months ago
add scaling factor for dragging See merge request
!33
32b5f9f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/disagg/DisaggGraphView.js
+4
-2
4 additions, 2 deletions
src/disagg/DisaggGraphView.js
types/disagg/DisaggGraphViewOptions.d.ts
+11
-5
11 additions, 5 deletions
types/disagg/DisaggGraphViewOptions.d.ts
with
15 additions
and
7 deletions
src/disagg/DisaggGraphView.js
View file @
32b5f9f6
...
...
@@ -15,6 +15,8 @@ var _DEFAULTS;
_DEFAULTS
=
{
allowDrag
:
true
,
dragXScale
:
3.5
,
dragZScale
:
3.0
};
var
__calculateBounds
;
...
...
@@ -153,8 +155,8 @@ var DisaggGraphView = function (options) {
})
.
on
(
'
mousemove
'
,
event
=>
{
if
(
dragging
)
{
var
dx
=
event
.
clientX
-
origin
.
x
;
var
dz
=
event
.
clientY
-
origin
.
y
;
var
dx
=
(
event
.
clientX
-
origin
.
x
)
*
options
.
dragXScale
;
var
dz
=
(
event
.
clientY
-
origin
.
y
)
*
options
.
dragZScale
;
var
[
x
,
y
,
z
]
=
_this
.
d33d
.
model
.
get
(
'
origin
'
);
_this
.
setOrigin
(
x
-
dx
,
y
,
z
+
dz
)
origin
.
x
=
event
.
clientX
;
...
...
This diff is collapsed.
Click to expand it.
types/disagg/DisaggGraphViewOptions.d.ts
View file @
32b5f9f6
...
...
@@ -3,6 +3,12 @@ import {Disaggregation} from './Disaggregation';
export
interface
DisaggGraphViewOptions
extends
SelectedCollectionViewOptions
<
Disaggregation
>
{
/**
* Collection with data to display.
* Selected Disaggregation object is displayed.
*/
collection
:
Collection
<
Disaggregation
>
;
/**
* Whether to allow drag and rotate of graph.
*/
...
...
@@ -14,9 +20,9 @@ export interface DisaggGraphViewOptions
*/
bounds
?:
number
[][];
/**
* Collection with data to display.
* Selected Disaggregation object is displayed.
*/
collection
:
Collection
<
Disaggregation
>
;
/**
Scale factor for mouse movement to plot movement in X axis of plot */
dragXScale
?:
number
;
/** Scale factor for mouse movement to plot movement in Z axis of plot
*/
dragZScale
?:
number
;
}
This diff is collapsed.
Click to expand it.