0.1.2 • Published 6 months ago

@cameratag/photo v0.1.2

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
6 months ago

CameraTag's Photo

This library allows you to embed a CameraTag <photo> in your product.

Initialize A Photo

'Magically' initialize your photo using HTML

<photo
  id='myFirstPhoto'
  data-uuid='a-6793d070-dbac-013b-f57a-529b7d4fe95c'>
</photo>

<script>
  CameraTagPhoto.setup(); // Scan DOM for new <photo> tags 
  // if you need to access the newly initialized &lt:photo> 
  // you can get a handle with.
  myPhoto = CameraTagPhoto.instances["myFirstPhoto"];
</script>

Manually initialize your photo using JS

<div id="load_photo_here"></div>
<script>
  CameraTagPhoto = require("@cameratag/photo");
  var el = document.getElementById("load_photo_here");
  var myPhoto = new CameraTagPhoto();
  myPhoto.init(el {
    id: 'myFirstPhoto'
    uuid: 'a-6793d070-dbac-013b-f57a-529b7d4fe95c', 
  })
<script>
0.1.2

6 months ago

0.1.1

8 months ago

0.1.0

8 months ago