Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
BalaSwecha
Density
Commits
20d6d2ad
Commit
20d6d2ad
authored
Oct 24, 2014
by
Swathi V
Browse files
Defect#37
parent
cf49a219
Changes
1
Hide whitespace changes
Inline
Side-by-side
qml/view/DensityWin.qml
View file @
20d6d2ad
...
...
@@ -84,18 +84,13 @@ Item {
id
:
buttonMouseArea
anchors.fill
:
parent
onClicked
:
{
if
(
droppedObject
!==
null
&&
droppedObject
.
state
==
"
inBeaker
"
&&
droppedObject
.
getSinkStatus
(
liqDensity
)
!==
droppedObject
.
getSinkStatus
(
liquidArea
.
density
))
{
console
.
log
(
"
droppedObject.y:
"
+
droppedObject
.
y
+
"
,dropArea.height:
"
+
dropArea
.
height
+
"
,dropArea.y
"
+
dropArea
.
y
+
"
, liquidArea.y:
"
+
liquidArea
.
y
+
"
,
"
+
liquidArea
.
height
+
"
, getObjectBottomSinkLevel:
"
+
getObjectBottomSinkLevel
(
liquidArea
.
density
))
//- drag.y
if
(
droppedObject
.
getSinkStatus
(
liqDensity
)
==
"
sinks
"
){
droppedObject
.
changePosition
(
droppedObject
.
x
,
droppedObject
.
y
+
getObjectBottomSinkLevel
(
liquidArea
.
density
)
-
getObjectBottomSinkLevel
(
liqDensity
))
//+liquidArea.height
}
else
{
droppedObject
.
changePosition
(
droppedObject
.
x
,
droppedObject
.
y
+
droppedObject
.
height
-
getObjectBottomSinkLevel
(
liqDensity
))
}
if
(
droppedObject
!==
null
&&
droppedObject
.
state
==
"
inBeaker
"
)
{
droppedObject
.
changePosition
(
droppedObject
.
x
,
droppedObject
.
y
+
getObjectBottomSinkLevel
(
liquidArea
.
density
)
-
getObjectBottomSinkLevel
(
liqDensity
))
liquidArea
.
density
=
liqDensity
liquidArea
.
type
=
liquidText
.
text
resultsGrid
.
addRow
(
droppedObject
.
imgName
,
liquidArea
.
type
,
liquidArea
.
density
,
droppedObject
.
getSinkStatus
(
liquidArea
.
density
))
if
(
liquidArea
.
color
!==
color
){
resultsGrid
.
addRow
(
droppedObject
.
imgName
,
liquidArea
.
type
,
liquidArea
.
density
,
droppedObject
.
getSinkStatus
(
liquidArea
.
density
))
}
}
liquidArea
.
density
=
liqDensity
liquidArea
.
type
=
liquidText
.
text
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment