Sketch-Server icon indicating copy to clipboard operation
Sketch-Server copied to clipboard

Doesn't work in 39.1

Open alexeiboronnikov opened this issue 9 years ago • 10 comments

I'm getting just a blank page in browser with no image preview.

alexeiboronnikov avatar Aug 17 '16 11:08 alexeiboronnikov

Any luck, Matt?

alexeiboronnikov avatar Sep 22 '16 19:09 alexeiboronnikov

Your plugin is much better than the mirror web preview

alexeiboronnikov avatar Sep 22 '16 19:09 alexeiboronnikov

Not yet - hoping to get to it very soon, though! Thanks for the reminder.

matt-curtis avatar Sep 23 '16 00:09 matt-curtis

@matt-curtis For me Sketch Server works fine on Sketch 40.1.

andrejilderda avatar Sep 28 '16 11:09 andrejilderda

@ajilderda humm, maybe it conflicts with some other plugins on my side

alexeiboronnikov avatar Sep 28 '16 11:09 alexeiboronnikov

@alexeiboronnikov if you could pull the crash/error you're getting from Console.app, that would help a lot.

matt-curtis avatar Sep 28 '16 13:09 matt-curtis

For me it does not work. I get a blank page. but the page is being served; not sure what could be the reason for the blank page. My Sketch version is 44.1 (41455)

Page source from the browser:

Sketch Server Preview
	<style>
		html {
			height: 100%;
		}

		body {
			margin: 0; height: 100%;

			cursor: pointer;
		}
		
		#image {
			min-width: 100%;
			min-height: 100%;

			background-repeat: no-repeat;
			background-position: center;
		}
	</style>

	<script type="text/javascript">
		window.addEventListener("DOMContentLoaded", function(){
			var body = document.body;

			//	Reload on tap

			body.addEventListener("click", function(){
				window.location.reload();
			});

			//	Set & Size Image

			var size = { width: 0, height: 0 }
		
			var imageElement = document.getElementById("image");
			var query = window.location.search;
			
			imageElement.style.width = size.width+"px";
			imageElement.style.height = size.height+"px";
			imageElement.style.backgroundSize = size.width+"px "+size.height+"px";
			imageElement.style.backgroundImage = "url('/image"+query+"')";
		}, false);
	</script>
</head>

<body><div id="image"/></body>

avadhbsd avatar May 23 '17 16:05 avadhbsd

Absolutely the same!

alexeiboronnikov avatar May 23 '17 16:05 alexeiboronnikov

Probably the artboard image export is wrong. Should get some time this week to fix this :)

matt-curtis avatar May 23 '17 16:05 matt-curtis

Any news here? Tried it in sketch 44.1 and got a blank page. Could you fix it? The idea is awesome!

maxbln avatar Jul 07 '17 14:07 maxbln