From f6bf702d9b4e468b4040922e4133e26bd15984e2 Mon Sep 17 00:00:00 2001 From: John Lyon-Smith Date: Tue, 10 Apr 2018 08:48:11 -0700 Subject: [PATCH] Fix bugs with image size and AR view production build --- mobile/src/ARViewer/ARViewer.js | 24 +++++------ .../{clipboard.obj => clipboard_obj.obj} | 0 .../models/{hardhat.obj => hardhat_obj.obj} | 0 .../models/{question.obj => question_obj.obj} | 0 mobile/src/Home/Home.js | 10 ++--- mobile/src/Home/images/pin.png | Bin 1375 -> 0 bytes mobile/src/ui/Icon.js | 39 +++++++++++------- mobile/src/ui/images/pin.png | Bin 0 -> 2133 bytes 8 files changed, 40 insertions(+), 33 deletions(-) rename mobile/src/ARViewer/models/{clipboard.obj => clipboard_obj.obj} (100%) rename mobile/src/ARViewer/models/{hardhat.obj => hardhat_obj.obj} (100%) rename mobile/src/ARViewer/models/{question.obj => question_obj.obj} (100%) delete mode 100644 mobile/src/Home/images/pin.png create mode 100644 mobile/src/ui/images/pin.png diff --git a/mobile/src/ARViewer/ARViewer.js b/mobile/src/ARViewer/ARViewer.js index f851e80..33fc58f 100644 --- a/mobile/src/ARViewer/ARViewer.js +++ b/mobile/src/ARViewer/ARViewer.js @@ -22,18 +22,18 @@ const styles = { } const shapes = { - // hardhat: { - // shape: require("./models/hardhat.obj"), - // materials: [require("./models/hardhat.mtl")], - // }, - // question: { - // shape: require("./models/question.obj"), - // materials: [require("./models/question.mtl")], - // }, - // clipboard: { - // shape: require("./models/clipboard.obj"), - // materials: [require("./models/clipboard.mtl")], - // }, + hardhat: { + shape: require("./models/hardhat_obj.obj"), + materials: [require("./models/hardhat.mtl")], + }, + question: { + shape: require("./models/question_obj.obj"), + materials: [require("./models/question.mtl")], + }, + clipboard: { + shape: require("./models/clipboard_obj.obj"), + materials: [require("./models/clipboard.mtl")], + }, } class WorkItemSceneAR extends React.Component { diff --git a/mobile/src/ARViewer/models/clipboard.obj b/mobile/src/ARViewer/models/clipboard_obj.obj similarity index 100% rename from mobile/src/ARViewer/models/clipboard.obj rename to mobile/src/ARViewer/models/clipboard_obj.obj diff --git a/mobile/src/ARViewer/models/hardhat.obj b/mobile/src/ARViewer/models/hardhat_obj.obj similarity index 100% rename from mobile/src/ARViewer/models/hardhat.obj rename to mobile/src/ARViewer/models/hardhat_obj.obj diff --git a/mobile/src/ARViewer/models/question.obj b/mobile/src/ARViewer/models/question_obj.obj similarity index 100% rename from mobile/src/ARViewer/models/question.obj rename to mobile/src/ARViewer/models/question_obj.obj diff --git a/mobile/src/Home/Home.js b/mobile/src/Home/Home.js index a576e7e..0ba1b5e 100644 --- a/mobile/src/Home/Home.js +++ b/mobile/src/Home/Home.js @@ -106,7 +106,6 @@ export class Home extends React.Component { title="Work Item Map" leftButton={{ icon: "logout", onPress: this.handleLogoutPress }} rightButton={{ icon: "glasses", onPress: this.handleGlassesPress }} - disabled /> { @@ -137,10 +136,10 @@ export class Home extends React.Component { workItemTypeText[workItem.workItemType] } description={workItem.address} - image={require("./images/pin.png")} anchor={{ x: 0.5, y: 1.0 }} - onPress={(e) => this.handleMarkerPress(e, index)} - /> + onPress={(e) => this.handleMarkerPress(e, index)}> + + ))} - WORK ORDER {pad(workItem.ticketNumber, 4)} + {workItemTypeText[workItem.workItemType].toUpperCase()}{" "} + {pad(workItem.ticketNumber, 4)} )} diff --git a/mobile/src/Home/images/pin.png b/mobile/src/Home/images/pin.png deleted file mode 100644 index 2b3ffe83679e0f5d158d69c0c47df54eac4f0d8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1375 zcmV-l1)%zgP)5mje7{+&X!H6sp!3%+1BZmPaB>K_Bp!mTfF)@D7Px`MZ z(Zs|f#ye^Zmxu`}QSbs;5fya>FC^f4{C@4!WOlZD`ly z6y=|VzgDqhpRa;7WO@u4S3l)jEoMCA?UMt%tkqb&IhHZ|u%Aq`%kV z*OpG-I>p$0&g`RvyK%Oyp?yK3vHY4*Qi88n!P|n*L5zW5M@Ss8^PTuRq0iZYvtz}j zLn{1*p^xBa@F(~ubkMpuH4?ev_B|&BuE0nZ-9l)-i-c6GU{|_NK||+RcoF{FI{W(= z{1E!^Qg!Pk*!oy8@Bj+e*`B|f4J5wVT0R!%74vhf70SDUxDWbHR2TPBAjP#2CWBuLjw{9|sGyB76|{SMi>Yk(vNOZY3yv9a z=>OBm9zW3YAm$6MOLy6aRI00WU-a5ye64-ggb~Dh_?&%Z3oWAtyV|I=j;->(&Wlbl zMzq~o>gXKy;Hq!A89K$7U^x9QyEFU;L;k$L)h))c^Xl;H$UJ<7V>VWTzj+ho@7#1_ z?S_zP2+!`jwZ}^Eue)VJ`kP#&Sbzq5DbK%P?2SBwMPeLOFF?E9FhPIxYu-nu;9y=i z3-|19Vmdnx$6+6C7^HGh)G{ISUM{{3KL&jMp89)E9c5yS7SF?8%lXC7Xt&o7=fXnt z>Sm$Pc`ghFTSLMC&W@9>%j&HnMjNxxyi@*IWbCKDgH`IRDn?r~a1C4q7YoO!=*6m) zm5rHBJBCI3?U~NRK3<>2_H(fE^iZc|^xF-?6L1@>Tb3e~VZhl1Ypvp&IOO}hVbV>I zahMvm#53@lx`vyGu@1X{|6Or&A~jyZ;L#>Vn~Jfn)2#}pTjvy~Js3IA)KH8V>ooSS zgxC2a5{D`8C&9*u6=TI;!q|{~3>!wu%8`q_3y?yL4!GGj1+QFCLwUj}vOEo=Kdqz? zqr0x*6m%1ugjMka8F#@XYrj-tblxZH{?#Vvn`#+cB0ULR`z1k2F*@YxRzaJgd&@;| z74ZaY`nf&VZfY@BVwVXmlqbkJN+IFpkIOXZhZsF85)_0i__JsVIsFn71RdeR&loG< h40M^&7a`ak`wz=?+bRyYR$Bl7002ovPDHLkV1j%|l^Xy6 diff --git a/mobile/src/ui/Icon.js b/mobile/src/ui/Icon.js index 4834018..e63275a 100644 --- a/mobile/src/ui/Icon.js +++ b/mobile/src/ui/Icon.js @@ -1,19 +1,20 @@ -import React, { Component } from 'react' -import { Image, View } from 'react-native' -import PropTypes from 'prop-types' +import React, { Component } from "react" +import { Image, View } from "react-native" +import PropTypes from "prop-types" const images = { - logout: require('./images/logout.png'), - glasses: require('./images/ar-glasses.png'), - back: require('./images/back.png'), - hand: require('./images/hand.png'), - center: require('./images/center.png'), - rightArrow: require('./images/right-arrow.png'), - search: require('./images/search.png'), - settings: require('./images/settings.png'), - add: require('./images/add.png'), - done: require('./images/done.png'), - target: require('./images/target.png'), + logout: require("./images/logout.png"), + glasses: require("./images/ar-glasses.png"), + back: require("./images/back.png"), + hand: require("./images/hand.png"), + center: require("./images/center.png"), + rightArrow: require("./images/right-arrow.png"), + search: require("./images/search.png"), + settings: require("./images/settings.png"), + add: require("./images/add.png"), + done: require("./images/done.png"), + target: require("./images/target.png"), + pin: require("./images/pin.png"), } export class Icon extends Component { @@ -31,13 +32,19 @@ export class Icon extends Component { render() { let { name, margin, style } = this.props - let size = this.props.size - (margin * 2) + let size = this.props.size - margin * 2 let source = images[name] if (!source) { return } else { - return + return ( + + ) } } } diff --git a/mobile/src/ui/images/pin.png b/mobile/src/ui/images/pin.png new file mode 100644 index 0000000000000000000000000000000000000000..78282740a8fd6f19978278ddc979656717340d18 GIT binary patch literal 2133 zcmZuy2~?6<8~!A9$R$^7b4J3fGb)=qgd|BWjktx1j25V1v92b*x(;7XUO3ltTqLRk98M zKpZBS!lRHpu%YZ21U-x$!axXOVijxvzzML5WekHyhYDh%SzN5Z5w^_0D%MIE34<~=<-Rfh#X;&JYFmoiRAP72);Ff&51yw zF&GRIWreh|f-4wsZUT!(7r<; zsc}f*U}8KrO+YNFWPTdW!%1AAdi?yF!~sQfYY2 z_)+5>W@+#ARq3(}b#R%^%%vq^9!PRHvI187K%=s}_WoOcfBy;-96?QZ}!RYO!e6Y|(6H$T9MesbA-d1ytP76gPMilT=-m zJ5$5pH`MtBZH4VXERlclYFQ=E2r)p5)WkzVxn11NS8CK&R$SA3L4nVhK%WJbeW((dy@X0}wA)B9k@-Yb#~kjA~Dy1Q-!8N{4>G*j0P zCIwgRY@dJ>WIhM1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