File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 this . node = outer . appendChild ( doc . createElement ( "div" ) )
3434 this . node . style . cssText = "position: relative; line-height: 0.1; margin-left: 10px"
3535 this . map = this . node . appendChild ( doc . createElement ( "img" ) )
36- this . map . src = "img/village2x.png"
36+ let imgPath = "img/"
37+ if ( / \/ c o d e ( $ | \/ ) / . test ( outer . ownerDocument . defaultView . location ) ) imgPath = "../" + imgPath
38+ console . log ( outer . ownerDocument . defaultView . location . toString ( ) , / \/ c o d e ( $ | \/ ) / . test ( outer . ownerDocument . defaultView . localation ) , imgPath )
39+ this . map . src = imgPath + "village2x.png"
3740 this . map . style . cssText = "vertical-align: -8px"
3841 this . robotElt = this . node . appendChild ( doc . createElement ( "div" ) )
3942 this . robotElt . style . cssText = `position: absolute; transition: left ${ 0.8 / speed } s, top ${ 0.8 / speed } s;`
4043 let robotPic = this . robotElt . appendChild ( doc . createElement ( "img" ) )
41- robotPic . src = "img/ robot_moving2x.gif"
44+ robotPic . src = imgPath + " robot_moving2x.gif"
4245 this . parcels = [ ]
4346
4447 this . text = this . node . appendChild ( doc . createElement ( "span" ) )
You can’t perform that action at this time.
0 commit comments