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
219773dc
Commit
219773dc
authored
Aug 29, 2019
by
Jeong Gilmo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/1.1.200_34467_new' into 'features/1.1.200'
marge See merge request
!29
parents
9b990b73
5cc804ab
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
22 deletions
+7
-22
ABVJE_Launcher_Android/assets/Drawing/css/drawingboard.css
+1
-1
ABVJE_Launcher_Android/assets/Drawing/index.html
+2
-2
ABVJE_Launcher_Android/assets/Drawing/js/drawingboard.js
+1
-9
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/PhotoEditActivity.java
+3
-10
No files found.
ABVJE_Launcher_Android/assets/Drawing/css/drawingboard.css
View file @
219773dc
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
.drawing-board
{
position
:
relative
;
display
:
block
;
}
.drawing-board
{
position
:
relative
;
display
:
block
;
}
.drawing-board-canvas-wrapper
{
position
:
relative
;
margin
:
auto
;
border
:
1px
solid
#ddd
;
}
.drawing-board-canvas-wrapper
{
position
:
relative
;
margin
:
0
;
border
:
1px
solid
#ddd
;
}
.drawing-board-canvas
{
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
10
;
width
:
auto
;
}
.drawing-board-canvas
{
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
10
;
width
:
auto
;
}
...
...
ABVJE_Launcher_Android/assets/Drawing/index.html
View file @
219773dc
...
@@ -76,8 +76,8 @@
...
@@ -76,8 +76,8 @@
});
});
//Canvasのサイズを写真の横縦割合に合わせて変更
//Canvasのサイズを写真の横縦割合に合わせて変更
function
resizeCanvasToRatio
(
ratio
,
maxHeight
){
function
resizeCanvasToRatio
(
ratio
){
aisEditTool
.
resizeCanvasToRatio
(
ratio
,
maxHeight
);
aisEditTool
.
resizeCanvasToRatio
(
ratio
);
}
}
//CanvasのBackgroundをイメージファイルのurlに設定
//CanvasのBackgroundをイメージファイルのurlに設定
...
...
ABVJE_Launcher_Android/assets/Drawing/js/drawingboard.js
View file @
219773dc
...
@@ -971,8 +971,7 @@ DrawingBoard.Board.prototype = {
...
@@ -971,8 +971,7 @@ DrawingBoard.Board.prototype = {
},
},
//Canvasのサイズを写真の横縦割合に合わせて変更
//Canvasのサイズを写真の横縦割合に合わせて変更
resizeCanvasToRatio
:
function
(
ratio
,
maxHeight
){
resizeCanvasToRatio
:
function
(
ratio
){
var
minWidth
=
240
;
//上位クラスの横幅と縦幅を修正
//上位クラスの横幅と縦幅を修正
this
.
$el
.
width
(
'100%'
);
this
.
$el
.
width
(
'100%'
);
this
.
$el
.
height
(
'100%'
);
this
.
$el
.
height
(
'100%'
);
...
@@ -980,13 +979,6 @@ DrawingBoard.Board.prototype = {
...
@@ -980,13 +979,6 @@ DrawingBoard.Board.prototype = {
var
w
=
this
.
$el
.
width
();
var
w
=
this
.
$el
.
width
();
var
h
=
w
*
ratio
;
//横幅によって縦幅を決める。
var
h
=
w
*
ratio
;
//横幅によって縦幅を決める。
if
(
w
<
minWidth
){
h
=
maxHeight
w
=
h
/
ratio
;
}
this
.
dom
.
$controls
.
width
(
188
);
//Canvasの縁のサイズを設定
//Canvasの縁のサイズを設定
this
.
dom
.
$canvasWrapper
.
css
(
'width'
,
w
+
'px'
);
this
.
dom
.
$canvasWrapper
.
css
(
'width'
,
w
+
'px'
);
this
.
dom
.
$canvasWrapper
.
css
(
'height'
,
h
+
'px'
);
this
.
dom
.
$canvasWrapper
.
css
(
'height'
,
h
+
'px'
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/PhotoEditActivity.java
View file @
219773dc
...
@@ -37,13 +37,10 @@ public class PhotoEditActivity extends Dialog {
...
@@ -37,13 +37,10 @@ public class PhotoEditActivity extends Dialog {
private
final
String
TAG
=
"PhotoEditActivity"
;
private
final
String
TAG
=
"PhotoEditActivity"
;
private
final
String
editToolPath
=
"file:///android_asset/Drawing/index.html"
;
//EditToolのパス。
private
final
String
editToolPath
=
"file:///android_asset/Drawing/index.html"
;
//EditToolのパス。
private
final
String
editToolName
=
"Drawing"
;
//EditToolの名
private
final
String
editToolName
=
"Drawing"
;
//EditToolの名
private
final
int
dialogMinWidthWeb
=
280
;
//ダイアローグの最小の横幅
private
WebView
editPageWebView
;
//ダイアローグの上に編集画面をロード
private
WebView
editPageWebView
;
//ダイアローグの上に編集画面をロード
private
Bitmap
bitmapOfPhoto
;
//写真のBitmap情報
private
Bitmap
bitmapOfPhoto
;
//写真のBitmap情報
private
float
photoWidth
;
private
float
photoWidth
;
private
float
photoHeight
;
private
float
photoHeight
;
private
float
displayHeight
;
private
float
displayDensity
;
private
String
photoFilePath
;
//ロードして修正するファイルのパス
private
String
photoFilePath
;
//ロードして修正するファイルのパス
private
JsInf
jsInf
=
new
JsInf
();
//Javascript Interface
private
JsInf
jsInf
=
new
JsInf
();
//Javascript Interface
private
Context
context
;
private
Context
context
;
...
@@ -82,8 +79,7 @@ public class PhotoEditActivity extends Dialog {
...
@@ -82,8 +79,7 @@ public class PhotoEditActivity extends Dialog {
Window
window
=
((
Activity
)
context
).
getWindow
();
Window
window
=
((
Activity
)
context
).
getWindow
();
window
.
getDecorView
().
getWindowVisibleDisplayFrame
(
displayRectangle
);
window
.
getDecorView
().
getWindowVisibleDisplayFrame
(
displayRectangle
);
float
photoRatio
=
photoWidth
/
photoHeight
;
//画面の横と縦の割合
float
photoRatio
=
photoWidth
/
photoHeight
;
//画面の横と縦の割合
displayHeight
=
(
float
)
displayRectangle
.
height
();
//画面の縦幅
float
displayHeight
=
(
float
)
displayRectangle
.
height
();
//画面の縦幅
displayDensity
=
getContext
().
getResources
().
getDisplayMetrics
().
density
;
float
displayWidth
=
(
float
)
displayRectangle
.
width
();
//画面の横幅
float
displayWidth
=
(
float
)
displayRectangle
.
width
();
//画面の横幅
int
dialogWidth
=
(
int
)
(
displayHeight
*
photoRatio
);
//ダイアローグの横幅を縦幅について計算
int
dialogWidth
=
(
int
)
(
displayHeight
*
photoRatio
);
//ダイアローグの横幅を縦幅について計算
...
@@ -93,13 +89,10 @@ public class PhotoEditActivity extends Dialog {
...
@@ -93,13 +89,10 @@ public class PhotoEditActivity extends Dialog {
if
(
getWindow
()
!=
null
)
{
if
(
getWindow
()
!=
null
)
{
if
(
dialogWidth
<
displayWidth
)
{
if
(
dialogWidth
<
displayWidth
)
{
//計算した横幅が画面より小さい場合はそのまま設定
//計算した横幅が画面より小さい場合はそのまま設定
if
(
dialogWidth
<
dialogMinWidthWeb
*
displayDensity
){
dialogWidth
=
(
int
)
(
dialogMinWidthWeb
*
displayDensity
);
}
getWindow
().
setLayout
(
dialogWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
getWindow
().
setLayout
(
dialogWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
}
else
{
}
else
{
//計算した横幅が画面より大き場合は画面の横幅に反映
//計算した横幅が画面より大き場合は画面の横幅に反映
getWindow
().
setLayout
(
(
int
)
displayWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
getWindow
().
setLayout
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
}
}
}
}
...
@@ -137,7 +130,7 @@ public class PhotoEditActivity extends Dialog {
...
@@ -137,7 +130,7 @@ public class PhotoEditActivity extends Dialog {
//最初ページロードの場合
//最初ページロードの場合
//ページロードの終了後のCanvas設定
//ページロードの終了後のCanvas設定
float
photoRatio
=
photoHeight
/
photoWidth
;
//写真の割合を計算
float
photoRatio
=
photoHeight
/
photoWidth
;
//写真の割合を計算
view
.
loadUrl
(
String
.
format
(
"javascript:resizeCanvasToRatio(%f
, %f);"
,
photoRatio
,
(
displayHeight
/
displayDensity
*
0.7f
)
));
//写真の割合によってCanvasのサイズを決める。
view
.
loadUrl
(
String
.
format
(
"javascript:resizeCanvasToRatio(%f
);"
,
photoRatio
));
//写真の割合によってCanvasのサイズを決める。
view
.
loadUrl
(
String
.
format
(
"javascript:setBackground('%s');"
,
photoFilePath
));
//Canvasの背景をイメージにする
view
.
loadUrl
(
String
.
format
(
"javascript:setBackground('%s');"
,
photoFilePath
));
//Canvasの背景をイメージにする
}
}
}
}
...
...
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