From 91e8fdb99e321496c54288fe5a3db6397c768c10 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 11 Jul 2020 00:50:00 +0200 Subject: building basic site. need to include cursors, etc --- frontend/views/page/components/tile.handle.js | 37 +++++++++++++++++++-------- 1 file changed, 26 insertions(+), 11 deletions(-) (limited to 'frontend/views/page/components/tile.handle.js') diff --git a/frontend/views/page/components/tile.handle.js b/frontend/views/page/components/tile.handle.js index dd89282..f3a700b 100644 --- a/frontend/views/page/components/tile.handle.js +++ b/frontend/views/page/components/tile.handle.js @@ -1,6 +1,7 @@ import React, { Component } from 'react' +import { Link } from 'react-router-dom' -const TileHandle = ({ tile, bounds, box, onMouseDown, onDoubleClick }) => { +const TileHandle = ({ tile, bounds, box, viewing, onMouseDown, onDoubleClick }) => { // console.log(tile) const { width, height } = tile.settings const style = { @@ -66,16 +67,30 @@ const TileHandle = ({ tile, bounds, box, onMouseDown, onDoubleClick }) => { style.height = tile.settings.height ? tile.settings.height + 'px' : 'auto' break } - return ( -
- {content} -
- ) + if (viewing && tile.href) { + return ( + +
+ {content} +
+ + ) + } else { + return ( +
+ {content} +
+ ) + } } const generateTransform = (tile, box) => { -- cgit v1.2.3-70-g09d2