Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
479d019d
Commit
479d019d
authored
Feb 27, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
作業コードが更新できない問題・作業登録ホットスポットでドラッグ&ドロップの修正
parent
ff95d636
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
69 deletions
+70
-69
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/ProjectLogic.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ZoomRelativeLayout.java
+69
-68
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/ProjectLogic.java
View file @
479d019d
...
@@ -316,7 +316,7 @@ public class ProjectLogic extends AbstractLogic {
...
@@ -316,7 +316,7 @@ public class ProjectLogic extends AbstractLogic {
if
(!
newValue
.
equals
(
taskDirectionsItemsDto
.
inputValue
))
{
if
(!
newValue
.
equals
(
taskDirectionsItemsDto
.
inputValue
))
{
// 値が異なる場合のみ、更新する
// 値が異なる場合のみ、更新する
taskDirectionsItemsDto
.
inputValue
=
newValue
;
taskDirectionsItemsDto
.
inputValue
=
newValue
;
if
(
taskDirectionsItemsDto
.
i
nputValue
.
startsWith
(
"q_1_"
))
{
if
(
taskDirectionsItemsDto
.
i
temKey
.
startsWith
(
"q_1_"
))
{
// 値が異なるため、作業コードの入力値を変更する
// 値が異なるため、作業コードの入力値を変更する
taskDto
.
taskCode
=
taskDirectionsItemsDto
.
inputValue
;
taskDto
.
taskCode
=
taskDirectionsItemsDto
.
inputValue
;
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ZoomRelativeLayout.java
View file @
479d019d
...
@@ -88,79 +88,80 @@ public class ZoomRelativeLayout extends RelativeLayout {
...
@@ -88,79 +88,80 @@ public class ZoomRelativeLayout extends RelativeLayout {
private
float
fX
;
private
float
fX
;
private
float
fY
;
private
float
fY
;
class
MyDragListener
implements
OnDragListener
{
class
MyDragListener
implements
OnDragListener
{
@Override
@Override
public
boolean
onDrag
(
View
v
,
DragEvent
event
)
{
public
boolean
onDrag
(
View
v
,
DragEvent
event
)
{
View
view
=
(
View
)
event
.
getLocalState
();
View
view
=
(
View
)
event
.
getLocalState
();
if
(
view
instanceof
ActionProjectTaskCode
||
view
instanceof
ActionProjectTaskPin
)
{
switch
(
event
.
getAction
())
{
switch
(
event
.
getAction
())
{
case
DragEvent
.
ACTION_DRAG_STARTED
:
case
DragEvent
.
ACTION_DRAG_STARTED
:
//理由不明、イベントが二回くる、二回目でgetX()だけがマイナス
//理由不明、イベントが二回くる、二回目でgetX()だけがマイナス
if
(
event
.
getX
()
>
0
)
{
if
(
event
.
getX
()
>
0
)
{
fX
=
event
.
getX
();
fX
=
event
.
getX
();
fY
=
event
.
getY
();
fY
=
event
.
getY
();
}
}
break
;
break
;
case
DragEvent
.
ACTION_DRAG_ENTERED
:
case
DragEvent
.
ACTION_DRAG_ENTERED
:
break
;
break
;
case
DragEvent
.
ACTION_DRAG_EXITED
:
case
DragEvent
.
ACTION_DRAG_EXITED
:
break
;
break
;
case
DragEvent
.
ACTION_DROP
:
case
DragEvent
.
ACTION_DROP
:
float
mX
=
event
.
getX
();
float
mX
=
event
.
getX
();
float
mY
=
event
.
getY
();
float
mY
=
event
.
getY
();
if
(
Math
.
abs
(
mX
-
fX
)
<
view
.
getWidth
()
/
2
&&
Math
.
abs
(
mY
-
fY
)
<
view
.
getHeight
()
/
2
)
{
if
(
Math
.
abs
(
mX
-
fX
)
<
view
.
getWidth
()
/
2
&&
Math
.
abs
(
mY
-
fY
)
<
view
.
getHeight
()
/
2
)
{
view
.
performClick
();
view
.
performClick
();
return
true
;
return
true
;
}
}
float
[]
pdfMatrix
=
getMatrixValue
(
getPageView
().
imgMatrix
);
float
[]
pdfMatrix
=
getMatrixValue
(
getPageView
().
imgMatrix
);
float
scaledWidth
=
getScaledPDFWidth
(
pdfMatrix
[
Matrix
.
MSCALE_X
]);
float
scaledWidth
=
getScaledPDFWidth
(
pdfMatrix
[
Matrix
.
MSCALE_X
]);
float
scaledHeight
=
getScaledPDFHeight
(
pdfMatrix
[
Matrix
.
MSCALE_Y
]);
float
scaledHeight
=
getScaledPDFHeight
(
pdfMatrix
[
Matrix
.
MSCALE_Y
]);
float
pdfX
=
pdfMatrix
[
Matrix
.
MTRANS_X
];
float
pdfX
=
pdfMatrix
[
Matrix
.
MTRANS_X
];
float
pdfY
=
pdfMatrix
[
Matrix
.
MTRANS_Y
];
float
pdfY
=
pdfMatrix
[
Matrix
.
MTRANS_Y
];
// If left-out or right-out of PDF
// If left-out or right-out of PDF
if
((
mX
-
pdfX
)
<
0
)
{
if
((
mX
-
pdfX
)
<
0
)
{
mX
=
pdfX
;
mX
=
pdfX
;
}
else
if
(((
pdfX
+
scaledWidth
)
-
mX
)
<
0
)
{
}
else
if
(((
pdfX
+
scaledWidth
)
-
mX
)
<
0
)
{
mX
=
pdfX
+
scaledWidth
;
mX
=
pdfX
+
scaledWidth
;
}
}
// Yの座標がPDF範囲を超えたか判定フラグ
// Yの座標がPDF範囲を超えたか判定フラグ
boolean
isOutTranslation
=
false
;
boolean
isOutTranslation
=
false
;
// If top-out or bottom-out of PDF
// If top-out or bottom-out of PDF
// PDFの端上の基準値をピンとコードで分ける
// PDFの端上の基準値をピンとコードで分ける
float
checkTopY
=
(
view
instanceof
ActionProjectTaskPin
?
(
mY
+
view
.
getHeight
()
/
2
)
:
mY
);
float
checkTopY
=
(
view
instanceof
ActionProjectTaskPin
?
(
mY
+
view
.
getHeight
()
/
2
)
:
mY
);
if
(
checkTopY
-
pdfY
<
0
)
{
if
(
checkTopY
-
pdfY
<
0
)
{
isOutTranslation
=
true
;
isOutTranslation
=
true
;
mY
=
pdfY
;
mY
=
pdfY
;
}
else
if
(((
pdfY
+
scaledHeight
)
-
mY
)
<
0
)
{
}
else
if
(((
pdfY
+
scaledHeight
)
-
mY
)
<
0
)
{
isOutTranslation
=
true
;
isOutTranslation
=
true
;
mY
=
pdfY
+
scaledHeight
;
mY
=
pdfY
+
scaledHeight
;
}
}
// 作業のx座標をセット
// 作業のx座標をセット
view
.
setTranslationX
(
mX
-
view
.
getWidth
()
/
2
);
view
.
setTranslationX
(
mX
-
view
.
getWidth
()
/
2
);
// 作業のy座標をセット(作業アイコンがピンで且つ、PDF範囲を超えたフラグ(isOutTranslation)がtrueの場合、(mY - アイコンの縦サイズ)で縦をセットする)
// 作業のy座標をセット(作業アイコンがピンで且つ、PDF範囲を超えたフラグ(isOutTranslation)がtrueの場合、(mY - アイコンの縦サイズ)で縦をセットする)
view
.
setTranslationY
(
mY
-
(
isOutTranslation
&&
view
instanceof
ActionProjectTaskPin
?
view
.
getHeight
()
:
view
.
getHeight
()
/
2
));
view
.
setTranslationY
(
mY
-
(
isOutTranslation
&&
view
instanceof
ActionProjectTaskPin
?
view
.
getHeight
()
:
view
.
getHeight
()
/
2
));
// タップした座標をPDF用の座標に変換する
// タップした座標をPDF用の座標に変換する
PointF
pdfPoint
=
tapConvertToAuthoringPoint
(
mX
,
view
instanceof
ActionProjectTaskPin
&&
!
isOutTranslation
?
mY
+
view
.
getHeight
()
/
2
:
mY
);
PointF
pdfPoint
=
tapConvertToAuthoringPoint
(
mX
,
view
instanceof
ActionProjectTaskPin
&&
!
isOutTranslation
?
mY
+
view
.
getHeight
()
/
2
:
mY
);
// 座標を更新する
// 座標を更新する
((
ContentViewActivity
)
mContext
).
updateProjectTaskPosition
(
pdfPoint
.
x
,
pdfPoint
.
y
);
((
ContentViewActivity
)
mContext
).
updateProjectTaskPosition
(
pdfPoint
.
x
,
pdfPoint
.
y
);
if
(
view
instanceof
ActionProjectTaskCode
||
view
instanceof
ActionProjectTaskPin
)
{
((
ContentViewActivity
)
mContext
).
updateProjectTaskPosition
();
((
ContentViewActivity
)
mContext
).
updateProjectTaskPosition
();
}
if
(
view
.
getVisibility
()
==
View
.
INVISIBLE
)
{
if
(
view
.
getVisibility
()
==
View
.
INVISIBLE
)
{
view
.
setVisibility
(
View
.
VISIBLE
);
view
.
setVisibility
(
View
.
VISIBLE
);
}
}
break
;
break
;
case
DragEvent
.
ACTION_DRAG_ENDED
:
case
DragEvent
.
ACTION_DRAG_ENDED
:
default
:
default
:
break
;
break
;
}
}
}
return
true
;
return
true
;
}
}
}
}
public
ZoomRelativeLayout
(
Context
context
)
{
public
ZoomRelativeLayout
(
Context
context
)
{
super
(
context
);
super
(
context
);
...
...
Write
Preview
Markdown
is supported
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